fix migrations

pull/15489/head
Gonzalo Riestra 5 years ago
parent b1e7d72e5b
commit 3416c96dc1

@ -1,8 +1,8 @@
Sequel.migration do Sequel.migration do
up do up do
Tag.db.run("DELETE FROM tags where name = ''") run "DELETE FROM tags where name = ''"
end end
down do down do
end end
end end

@ -1,16 +1,19 @@
Sequel.migration do require 'carto/db/migration_helper'
up do
drop_table :oauth_nonces
end
down do include Carto::Db::MigrationHelper
migration(
Proc.new do
drop_table :oauth_nonces
end,
Proc.new do
create_table :oauth_nonces do create_table :oauth_nonces do
Uuid :id, primary_key: true Uuid :id, primary_key: true
String :nonce String :nonce
Integer :timestamp Integer :timestamp
DateTime :created_at, :null => false DateTime :created_at, null: false
DateTime :updated_at, :null => false DateTime :updated_at, null: false
index [:nonce, :timestamp], :unique => true index [:nonce, :timestamp], unique: true
end end
end end
end )
Loading…
Cancel
Save