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.
ruby-hniu/db/migrate/20240410022702_create_new_c...

24 lines
470 B

class CreateNewClassTables < ActiveRecord::Migration[5.2]
def change
unless table_exists?(:time_tables)
create_table :time_tables do |t|
t.string :name
t.references :user_class
t.boolean :is_use
t.timestamps
end
end
unless table_exists?(:new_class_tables)
create_table :new_class_tables do |t|
t.references :user_class
t.boolean :is_use
t.timestamps
end
end
end
end