site-libsoc/Server/db/migrations/2021061519532446_create_tab...

23 lines
415 B
Julia
Raw Normal View History

2023-06-15 01:41:54 +07:00
module CreateTableRolesUsers
import SearchLight.Migrations: create_table, column, primary_key, add_index, drop_table
function up()
create_table(:rolesusers) do
[
primary_key()
column(:roles_id, :int)
column(:users_id, :int)
]
end
add_index(:rolesusers, :roles_id)
add_index(:rolesusers, :users_id)
end
function down()
drop_table(:rolesusers)
end
end