All checks were successful
Frontend CI / build (push) Successful in 1m9s
This commit introduces the capability to upload and serve images. A new `image` feature module has been added to the backend, following the existing clean architecture pattern. - Implements `POST /image/upload` for uploading image files. - Implements `GET /image/{id}` for retrieving an image by its ID. - Adds a new `image` table to the database to store image metadata. - Image data is stored in the file system. The path can be configured via the `STORAGE_PATH` environment variable.
13 lines
391 B
SQL
13 lines
391 B
SQL
CREATE TABLE "image" (
|
|
"id" SERIAL PRIMARY KEY NOT NULL,
|
|
"mime_type" VARCHAR(100) NOT NULL,
|
|
"deleted_time" TIMESTAMP,
|
|
"created_time" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
"updated_time" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
CREATE TRIGGER "update_image_updated_time"
|
|
BEFORE UPDATE ON "image"
|
|
FOR EACH ROW
|
|
EXECUTE FUNCTION update_updated_time_column();
|