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

32 lines
815 B
Julia
Raw Normal View History

module CreateTableCoopsRequests
2023-07-22 17:22:35 +07:00
import SearchLight.Migrations: create_table, column, primary_key, add_index, drop_table
include("../../lib/DatabaseSupport.jl")
using .DatabaseSupport
function up()
create_table(:cooperatives_requests) do
2023-07-22 17:22:35 +07:00
[
primary_key()
column(:id_given, :integer)
column(:country, :string)
column(:state, :string)
column(:town, :string)
column(:contact, :string)
column(:latitude, :float)
column(:longitude, :float)
column(:verified, :bool)
column(:added, :bool)
]
end
set_default("cooperatives_requests","verified",false)
set_default("cooperatives_requests","added",false)
2023-07-22 17:22:35 +07:00
end
function down()
drop_table(:cooperatives_requests)
2023-07-22 17:22:35 +07:00
end
end