Fixed some migrations that were mistyped; updated the Rakefile to include bundler setup for gems
This commit is contained in:
parent
7a81e2c57e
commit
c8764db47b
2
Rakefile
2
Rakefile
@ -1,3 +1,5 @@
|
|||||||
|
require 'bundler/setup'
|
||||||
|
|
||||||
require 'sequel'
|
require 'sequel'
|
||||||
require 'sqlite3'
|
require 'sqlite3'
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ Sequel.migration do
|
|||||||
String :type
|
String :type
|
||||||
String :purchased_from
|
String :purchased_from
|
||||||
DateTime :purchased_at
|
DateTime :purchased_at
|
||||||
DateTime :created_at
|
DateTime :created_at, default: Sequel::CURRENT_TIMESTAMP
|
||||||
DateTime :updated_at
|
DateTime :updated_at, default: Sequel::CURRENT_TIMESTAMP
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ Sequel.migration do
|
|||||||
create_table(:item_comments) do
|
create_table(:item_comments) do
|
||||||
primary_key :id
|
primary_key :id
|
||||||
String :body, null: false
|
String :body, null: false
|
||||||
DateTime :created_at
|
DateTime :created_at, default: Sequel::CURRENT_TIMESTAMP
|
||||||
DateTime :updated_at
|
DateTime :updated_at, default: Sequel::CURRENT_TIMESTAMP
|
||||||
end
|
end
|
||||||
|
|
||||||
alter_table(:item_comments) do
|
alter_table(:item_comments) do
|
||||||
|
@ -4,12 +4,12 @@ Sequel.migration do
|
|||||||
create_table(:license_comments) do
|
create_table(:license_comments) do
|
||||||
primary_key :id
|
primary_key :id
|
||||||
String :body, null: false
|
String :body, null: false
|
||||||
DateTime :created_at
|
DateTime :created_at, default: Sequel::CURRENT_TIMESTAMP
|
||||||
DateTime :updated_at
|
DateTime :updated_at, default: Sequel::CURRENT_TIMESTAMP
|
||||||
end
|
end
|
||||||
|
|
||||||
alter_table(:license_comments) do
|
alter_table(:license_comments) do
|
||||||
add_foreign_key :license_id, :items
|
add_foreign_key :license_id, :licenses
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user