2024-10-19 11:28:02 +00:00
|
|
|
CREATE TABLE "expense" (
|
|
|
|
"id" serial NOT NULL,
|
|
|
|
PRIMARY KEY ("id"),
|
|
|
|
"created_at" date NOT NULL,
|
|
|
|
"updated_at" date NOT NULL,
|
|
|
|
"amount" integer NOT NULL,
|
|
|
|
"currency" character varying NOT NULL,
|
|
|
|
"event_id" integer NOT NULL,
|
2024-10-19 15:08:05 +00:00
|
|
|
"name" character varying(255) NULL,
|
|
|
|
"place" character varying(1000) NULL
|
2024-10-19 11:28:02 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
ALTER TABLE "expense"
|
|
|
|
ADD FOREIGN KEY ("event_id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|