Skip to content

Commit

Permalink
feat: location_image table
Browse files Browse the repository at this point in the history
  • Loading branch information
ayaanqui committed Apr 23, 2024
1 parent 0be1ebf commit 39ac519
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 0 deletions.
24 changes: 24 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.

99 changes: 99 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.

11 changes: 11 additions & 0 deletions database/migrations/1713882521714538_location_image.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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,
"caption" TEXT,
"created_by" BIGINT REFERENCES "user"("id") ON DELETE SET NULL,
"updated_by" BIGINT REFERENCES "user"("id") ON DELETE SET NULL
);

0 comments on commit 39ac519

Please sign in to comment.