Fixed some migrations that were mistyped; updated the Rakefile to include bundler setup for gems

This commit is contained in:
Gregory Ballantine 2022-12-09 21:19:53 -05:00
parent 7a81e2c57e
commit c8764db47b
4 changed files with 9 additions and 7 deletions

View File

@ -1,3 +1,5 @@
require 'bundler/setup'
require 'sequel'
require 'sqlite3'

View File

@ -10,8 +10,8 @@ Sequel.migration do
String :type
String :purchased_from
DateTime :purchased_at
DateTime :created_at
DateTime :updated_at
DateTime :created_at, default: Sequel::CURRENT_TIMESTAMP
DateTime :updated_at, default: Sequel::CURRENT_TIMESTAMP
end
end

View File

@ -4,8 +4,8 @@ Sequel.migration do
create_table(:item_comments) do
primary_key :id
String :body, null: false
DateTime :created_at
DateTime :updated_at
DateTime :created_at, default: Sequel::CURRENT_TIMESTAMP
DateTime :updated_at, default: Sequel::CURRENT_TIMESTAMP
end
alter_table(:item_comments) do

View File

@ -4,12 +4,12 @@ Sequel.migration do
create_table(:license_comments) do
primary_key :id
String :body, null: false
DateTime :created_at
DateTime :updated_at
DateTime :created_at, default: Sequel::CURRENT_TIMESTAMP
DateTime :updated_at, default: Sequel::CURRENT_TIMESTAMP
end
alter_table(:license_comments) do
add_foreign_key :license_id, :items
add_foreign_key :license_id, :licenses
end
end