Sha256: d1302f3cedc71823e54ff79e0cbaa0401716fa2aada12da7dce0f89ba986238e

Contents?: true

Size: 653 Bytes

Versions: 4

Compression:

Stored size: 653 Bytes

Contents

class CreateContent < ActiveRecord::Migration
	def change
		create_table :odania_contents do |t|
			t.string :title, null: false
			t.integer :menu_item_id
			t.text :body, null: false
			t.text :body_filtered, null: false
			t.text :body_short, null: false
			t.integer :clicks, default: 0
			t.integer :views, default: 0
			t.datetime :published_at, null: false
			t.boolean :is_active, default: false
			t.integer :site_id, null: false
			t.integer :language_id, null: false
			t.integer :user_id, null: false
			t.timestamps
		end

		add_index :odania_contents, [:site_id, :language_id, :is_active]
		add_index :odania_contents, [:user_id]
	end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
odania_core-0.0.4 db/migrate/20140313225260_create_content.rb
odania_core-0.0.3 db/migrate/20140313225260_create_content.rb
odania_core-0.0.2 db/migrate/20140313225260_create_content.rb
odania_core-0.0.1 db/migrate/20140313225260_create_content.rb