feat: Update project structure and configuration files
This commit is contained in:
25
backend/database/migrations/20250322100215_create_posts.sql
Normal file
25
backend/database/migrations/20250322100215_create_posts.sql
Normal file
@@ -0,0 +1,25 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
CREATE TABLE posts(
|
||||
id SERIAL8 PRIMARY KEY,
|
||||
created_at timestamp NOT NULL DEFAULT now(),
|
||||
updated_at timestamp NOT NULL DEFAULT now(),
|
||||
deleted_at timestamp,
|
||||
status int2 NOT NULL DEFAULT 0,
|
||||
title varchar(128) NOT NULL,
|
||||
description varchar(256) NOT NULL,
|
||||
content text NOT NULL,
|
||||
price int8 NOT NULL DEFAULT 0,
|
||||
discount int2 NOT NULL DEFAULT 100,
|
||||
views int8 NOT NULL DEFAULT 0,
|
||||
likes int8 NOT NULL DEFAULT 0,
|
||||
tags jsonb DEFAULT '{}' ::jsonb,
|
||||
assets jsonb DEFAULT '{}' ::jsonb
|
||||
);
|
||||
|
||||
-- +goose StatementEnd
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
DROP TABLE posts;
|
||||
|
||||
-- +goose StatementEnd
|
||||
Reference in New Issue
Block a user