This repository has been archived on 2024-12-01. You can view files and clone it, but cannot push or open issues or pull requests.
redmine_rodax_crm/db/migrate/020_create_notes.rb

21 lines
437 B
Ruby
Raw Permalink Normal View History

class CreateNotes < ActiveRecord::Migration
def self.up
create_table :notes do |t|
t.string :subject
t.text :content
t.integer :source_id
t.string :source_type
t.integer :author_id
t.datetime :created_on
t.datetime :updated_on
end
add_index :notes, [:source_id, :source_type]
add_index :notes, [:author_id]
end
def self.down
drop_table :notes
end
end