cartodb-4.42/db/migrate/20110117161245_users.rb
2024-04-06 05:25:13 +00: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