(WIP) Creating auctions

This commit is contained in:
2026-07-17 23:24:33 +03:00
parent a004c1a97e
commit e7bf5c1460
2 changed files with 20 additions and 3 deletions
+14
View File
@@ -0,0 +1,14 @@
-- !Ups
CREATE TABLE auctions
(
id BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
gid VARCHAR UNIQUE NOT NULL,
author_id BIGINT NOT NULL REFERENCES users (id) ON DELETE RESTRICT,
description VARCHAR,
starting_price DECIMAL(12, 3) NOT NULL,
current_bid DECIMAL(12, 3),
current_bidder_id BIGINT REFERENCES users (id) ON DELETE SET NULL
);
-- !Downs
DROP TABLE auctions;