summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-01-11 13:15:02 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-01-11 13:15:02 +0100
commit09caff2b2a06d1f8ac8203567035a21c612165f9 (patch)
tree999be04ff0a418a33e438be9befc8c9297e383f4 /bin
parent6301f63bd348109b8693a922f02e16d49205a8fd (diff)
send resources
Diffstat (limited to 'bin')
-rw-r--r--bin/db.php23
1 files changed, 22 insertions, 1 deletions
diff --git a/bin/db.php b/bin/db.php
index 7938f87..66258cc 100644
--- a/bin/db.php
+++ b/bin/db.php
@@ -211,7 +211,7 @@ DB::query(<<<SQL
SQL);
DB::query(<<<SQL
- create table if not exists "events_send_resources_merchants" (
+ create table if not exists "events_meta_send_resources_carriers" (
"id" bigserial primary key,
"event_id" bigint not null,
@@ -230,6 +230,27 @@ DB::query(<<<SQL
SQL);
DB::query(<<<SQL
+ create table if not exists "events_send_resources_carriers" (
+ "id" bigserial primary key,
+
+ "event_id" bigint not null,
+ constraint "relation_event"
+ foreign key ("event_id") references events("id") on delete cascade,
+
+ "source" bigint not null,
+ constraint "relation_village_source"
+ foreign key ("source") references villages("id"),
+
+ "destination" bigint not null,
+ constraint "relation_village_destination"
+ foreign key ("destination") references villages("id"),
+
+ "created_at" timestamp(0) not null default current_timestamp,
+ "updated_at" timestamp(0) not null default current_timestamp
+ );
+SQL);
+
+DB::query(<<<SQL
create table if not exists "users" (
"id" bigserial primary key,