Skip to content

Commit

Permalink
Location images (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayaanqui authored Apr 29, 2024
1 parent b99777e commit 40541ed
Show file tree
Hide file tree
Showing 15 changed files with 837 additions and 5 deletions.
25 changes: 25 additions & 0 deletions database/jet/postgres/public/model/location_image.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

102 changes: 102 additions & 0 deletions database/jet/postgres/public/table/location_image.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions database/jet/postgres/public/table/table_use_schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions database/migrations/1713882521714538_location_image.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CREATE TABLE "location_image" (
"id" BIGSERIAL UNIQUE PRIMARY KEY,
"created_at" TIMESTAMPTZ NOT NULL DEFAULT NOW(),
"updated_at" TIMESTAMPTZ NOT NULL DEFAULT NOW(),
"upload_id" TEXT NOT NULL UNIQUE,
"original_filename" VARCHAR(255) NOT NULL,
"location_id" BIGINT REFERENCES "location"("id") ON DELETE CASCADE NOT NULL,
"default" BOOLEAN NOT NULL DEFAULT FALSE,
"caption" TEXT,
"created_by" BIGINT REFERENCES "user"("id") ON DELETE SET NULL,
"updated_by" BIGINT REFERENCES "user"("id") ON DELETE SET NULL
);
Loading

0 comments on commit 40541ed

Please sign in to comment.