Add auth to delete endpoints
This commit is contained in:
@@ -6,7 +6,7 @@ pub fn migration() -> String {
|
||||
m.create_table("owners", |t| {
|
||||
t.add_column("id", types::primary().indexed(true));
|
||||
t.add_column("name", types::varchar(255));
|
||||
t.add_column("api_key", types::uuid());
|
||||
t.add_column("api_key", types::uuid().indexed(true));
|
||||
t.add_column("ip_address", types::custom("inet").nullable(true));
|
||||
t.add_column("mod_version", types::varchar(25));
|
||||
t.add_column("created_at", types::custom("timestamp(3)"));
|
||||
@@ -37,6 +37,7 @@ pub fn migration() -> String {
|
||||
m.create_table("merchandise", |t| {
|
||||
t.add_column("id", types::primary().indexed(true));
|
||||
t.add_column("shop_id", types::foreign("shops", "id").indexed(true));
|
||||
t.add_column("owner_id", types::foreign("owners", "id").indexed(true));
|
||||
t.add_column("mod_name", types::varchar(255));
|
||||
t.add_column("local_form_id", types::integer());
|
||||
t.add_column("quantity", types::integer());
|
||||
@@ -51,6 +52,7 @@ pub fn migration() -> String {
|
||||
m.create_table("transactions", |t| {
|
||||
t.add_column("id", types::primary().indexed(true));
|
||||
t.add_column("shop_id", types::foreign("shops", "id").indexed(true));
|
||||
t.add_column("owner_id", types::foreign("owners", "id").indexed(true));
|
||||
t.add_column("merchandise_id", types::foreign("merchandise", "id"));
|
||||
t.add_column("customer_name", types::varchar(255));
|
||||
t.add_column("is_customer_npc", types::boolean());
|
||||
@@ -63,6 +65,7 @@ pub fn migration() -> String {
|
||||
m.create_table("interior_ref_lists", |t| {
|
||||
t.add_column("id", types::primary().indexed(true));
|
||||
t.add_column("shop_id", types::foreign("shops", "id").indexed(true));
|
||||
t.add_column("owner_id", types::foreign("owners", "id").indexed(true));
|
||||
t.add_column("ref_list", types::custom("jsonb"));
|
||||
t.add_column("created_at", types::custom("timestamp(3)"));
|
||||
t.add_column("updated_at", types::custom("timestamp(3)"));
|
||||
|
||||
Reference in New Issue
Block a user