apskel-pos-backend/migrations/000008_add-table-order-items.up.sql
aditya.siregar 67f1dbc850 init project
2024-05-28 14:14:55 +07:00

13 lines
396 B
SQL

CREATE TABLE order_items
(
order_item_id BIGSERIAL PRIMARY KEY,
order_id INTEGER REFERENCES orders (id),
item_id INTEGER,
item_type VARCHAR,
price DECIMAL NOT NULL,
qty INTEGER,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
created_by INTEGER,
updated_by INTEGER
);