mirror of
https://github.com/hexolan/stocklet.git
synced 2026-03-26 19:51:17 +00:00
chore: initial commit
This commit is contained in:
2
schema/sql/product/000001_init_product.down.sql
Normal file
2
schema/sql/product/000001_init_product.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
DROP TABLE IF EXISTS products CASCADE;
|
||||
DROP TABLE IF EXISTS event_outbox CASCADE;
|
||||
18
schema/sql/product/000001_init_product.up.sql
Normal file
18
schema/sql/product/000001_init_product.up.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
CREATE TABLE products (
|
||||
id bigserial PRIMARY KEY,
|
||||
|
||||
name varchar(128) NOT NULL,
|
||||
description varchar(256) NOT NULL,
|
||||
price money NOT NULL,
|
||||
|
||||
created_at timestamp NOT NULL DEFAULT timezone('utc', now()),
|
||||
updated_at timestamp
|
||||
);
|
||||
|
||||
CREATE TABLE event_outbox (
|
||||
id bigserial PRIMARY KEY,
|
||||
|
||||
aggregateid varchar(128) NOT NULL,
|
||||
aggregatetype varchar(128) NOT NULL,
|
||||
payload bytea NOT NULL
|
||||
);
|
||||
Reference in New Issue
Block a user