summaryrefslogtreecommitdiff
path: root/bin/db.php
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2025-03-24 13:28:57 +0100
committerDaniel Weipert <git@mail.dweipert.de>2025-03-24 13:28:57 +0100
commita21b030abd4d5cd88f914f79574e425c7908553a (patch)
treec4eca5ff8e3dd5b12c4a151045ebb0991b211a9b /bin/db.php
parentd58f61770463aab2c71464c11f902f0074b49b62 (diff)
various changesHEADmain
Diffstat (limited to 'bin/db.php')
-rw-r--r--bin/db.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/db.php b/bin/db.php
index 66258cc..914ff5f 100644
--- a/bin/db.php
+++ b/bin/db.php
@@ -117,12 +117,12 @@ DB::query(<<<SQL
constraint "relation_event"
foreign key ("event_id") references events("id") on delete cascade,
- "village_id" bigint not null,
- constraint "relation_village"
- foreign key ("village_id") references villages("id") on delete cascade,
-
"type" character varying(255) not null,
+ "wood" bigint not null,
+ "clay" bigint not null,
+ "iron" bigint not null,
+
"created_at" timestamp(0) not null default current_timestamp,
"updated_at" timestamp(0) not null default current_timestamp
);
@@ -136,13 +136,13 @@ DB::query(<<<SQL
constraint "relation_event"
foreign key ("event_id") references events("id") on delete cascade,
- "village_id" bigint not null,
- constraint "relation_village"
- foreign key ("village_id") references villages("id") on delete cascade,
-
"amount" bigint not null,
"type" character varying(255) not null,
+ "wood" bigint not null,
+ "clay" bigint not null,
+ "iron" bigint not null,
+
"created_at" timestamp(0) not null default current_timestamp,
"updated_at" timestamp(0) not null default current_timestamp
);
@@ -220,7 +220,7 @@ DB::query(<<<SQL
"unit_id" bigint not null,
constraint "relation_unit"
- foreign key ("unit") references village_units("id"),
+ foreign key ("unit_id") references village_units("id"),
"amount" bigint not null,