cartodb/db/migrate/20110117161245_users.rb

24 lines
500 B
Ruby
Raw Normal View History

2020-06-15 10:58:47 +08:00
class UsersMigration < Sequel::Migration
def up
create_table :users do
primary_key :id
String :email, :null => false, :unique => true
String :crypted_password, :null => false
String :salt, :null => false
String :database_name
String :username, :unique => true, :null => false
Integer :tables_count, :null => false
end
alter_table(:users) do
set_column_default :tables_count, 0
end
end
def down
drop_table :users
end
end