game-data/db/migrations/0001_add_initial_tables.rb

29 lines
695 B
Ruby
Raw Normal View History

Sequel.migration do
up do
create_table(:hardware) do
primary_key :id
String :name, null: false
String :type, null: false
2023-12-07 12:59:32 -05:00
String :description, text: true
DateTime :created_at, default: Sequel::CURRENT_TIMESTAMP
DateTime :updated_at, default: Sequel::CURRENT_TIMESTAMP
end
create_table(:benchmarks) do
primary_key :id
String :name, null: false
2023-12-07 12:59:32 -05:00
String :description, text: true
String :scoring, null: false
DateTime :created_at, default: Sequel::CURRENT_TIMESTAMP
DateTime :updated_at, default: Sequel::CURRENT_TIMESTAMP
end
end
down do
drop_table(:hardware)
drop_table(:benchmarks)
end
end