Sha256: fc7b37e6930d34c072aacff8cfb19d3abedc7b70728a668f1c3b4929556f3636

Contents?: true

Size: 427 Bytes

Versions: 2

Compression:

Stored size: 427 Bytes

Contents

class CreateDocuments < ActiveRecord::Migration
	def self.up
		create_table :documents do |t|
			t.references :owner
			t.string :title, :null => false
			t.text   :abstract
			t.boolean :shared_with_all, 
				:default => false, :null => false
			t.boolean :shared_with_select, 
				:default => false, :null => false
			t.timestamps
		end
		add_index :documents, :owner_id
	end

	def self.down
		drop_table :documents
	end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
jakewendt-simply_documents-1.3.4 generators/simply_documents/templates/migrations/create_documents.rb
jakewendt-documents-0.2.0 generators/documents/templates/migrations/create_documents.rb