You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
510 B
23 lines
510 B
1 year ago
|
Sequel.migration do
|
||
|
change do
|
||
|
create_table(:sources) do
|
||
1 year ago
|
foreign_key :entity_id, :entities, null: false
|
||
|
foreign_key :source_id, :entities, null: false
|
||
1 year ago
|
|
||
|
DateTime :created_at, null: false
|
||
|
DateTime :modified_at, null: false
|
||
|
|
||
|
unique %i[entity_id source_id]
|
||
|
end
|
||
|
|
||
|
create_table(:notes) do
|
||
1 year ago
|
foreign_key :entity_id, :entities, null: false
|
||
1 year ago
|
|
||
|
String :text, text: true
|
||
|
|
||
|
DateTime :created_at, null: false
|
||
|
DateTime :modified_at, null: false
|
||
|
end
|
||
|
end
|
||
|
end
|