Mejora migraciones con tabla de versiones
This commit is contained in:
@@ -29,7 +29,7 @@ CREATE TABLE IF NOT EXISTS order_tracking (
|
||||
start_date TIMESTAMP NOT NULL DEFAULT (now() at time zone 'utc'),
|
||||
update_date TIMESTAMP NOT NULL DEFAULT (now() at time zone 'utc'),
|
||||
finish_date TIMESTAMP
|
||||
)
|
||||
);
|
||||
|
||||
-- Busqueda según id de rabbit
|
||||
CREATE INDEX IF NOT EXISTS idx_order_correlation
|
||||
@@ -40,7 +40,7 @@ CREATE INDEX IF NOT EXISTS pending_orders
|
||||
WHERE order_tracking.finish_date IS NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS order_history(
|
||||
id SERIAL PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
||||
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
||||
order_id BIGINT NOT NULL,
|
||||
previous_status order_status NOT NULL, -- Siempre hay un estado anterior, para casos excepcioneale "unknown"
|
||||
new_status order_status NOT NULL,
|
||||
|
||||
Reference in New Issue
Block a user