raven/db/migrations/0003_add_licenses_table.rb

23 lines
495 B
Ruby

Sequel.migration do
up do
create_table(:licenses) do
primary_key :id
String :name, null: false
String :key, null: false
String :manufacturer
Integer :seats_used, default: 0
Integer :seats_total, default: 1
String :purchased_from
DateTime :purchased_at
DateTime :created_at, default: Sequel::CURRENT_TIMESTAMP
DateTime :updated_at, default: Sequel::CURRENT_TIMESTAMP
end
end
down do
drop_table(:licenses)
end
end