24 lines
612 B
Ruby
24 lines
612 B
Ruby
class CreateComics < ActiveRecord::Migration[8.0]
|
|
def change
|
|
create_table :publishers do |t|
|
|
t.datetime :created_date
|
|
t.datetime :last_modified_date
|
|
t.bigint :version
|
|
t.string :name
|
|
t.string :weblink
|
|
t.belongs_to :publisher, optional: true
|
|
end
|
|
change_column :publishers, :id, :string
|
|
|
|
create_table :comics do [t]
|
|
t.datetime :created_date
|
|
t.datetime :last_modified_date
|
|
t.bigint :version
|
|
t.string :title
|
|
t.string :weblink
|
|
t.belongs_to :publisher, foreign_key: true
|
|
end
|
|
change_column :comics, :id, :string
|
|
end
|
|
end
|