diff options
Diffstat (limited to 'db/migrate/20210520230216_create_titles.rb')
-rw-r--r-- | db/migrate/20210520230216_create_titles.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/db/migrate/20210520230216_create_titles.rb b/db/migrate/20210520230216_create_titles.rb new file mode 100644 index 0000000..512773f --- /dev/null +++ b/db/migrate/20210520230216_create_titles.rb @@ -0,0 +1,12 @@ +class CreateTitles < ActiveRecord::Migration[6.1] + def change + create_table :titles do |t| + t.string :gid + t.string :name + + t.timestamps + end + + add_reference :characters, :active_title, foreign_key: { to_table: :titles } + end +end |