cartodb-4.29/db/migrate/20110117161245_users.rb
2020-06-15 10:58:47 +08:00

24 lines
500 B
Ruby

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