added manager, driver, order, route, vehicle, warehouse endpoints,models and migrations.
This commit is contained in:
14
migrations/20260322074231_create_manager.sql
Normal file
14
migrations/20260322074231_create_manager.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
CREATE TABLE IF NOT EXISTS managers (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
user_id UUID UNIQUE REFERENCES users(id) ON DELETE CASCADE,
|
||||
warehouse_id UUID REFERENCES warehouses(id) ON DELETE SET NULL,
|
||||
slug VARCHAR(120) UNIQUE NOT NULL
|
||||
);
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
DROP TABLE IF EXISTS managers;
|
||||
-- +goose StatementEnd
|
||||
Reference in New Issue
Block a user