chore: add qe and integrations with rabbit mq

This commit is contained in:
d3m0k1d
2026-04-29 14:26:59 +03:00
parent fe740da06b
commit d3a2fe0f9c
18 changed files with 1823 additions and 47 deletions
+17
View File
@@ -0,0 +1,17 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS bales (
id SERIAL PRIMARY KEY,
type_id INTEGER,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- +goose StatementEnd
-- +goose StatementBegin
CREATE INDEX IF NOT EXISTS idx_bales_timestamp ON bales(timestamp);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS bales;
-- +goose StatementEnd
@@ -0,0 +1,28 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS bale_types (
id SERIAL PRIMARY KEY,
type VARCHAR(255) NOT NULL,
weight DECIMAL(10,2),
height DECIMAL(10,2),
width DECIMAL(10,2),
length DECIMAL(10,2)
);
-- +goose StatementEnd
-- +goose StatementBegin
ALTER TABLE bales ADD COLUMN IF NOT EXISTS type_id INTEGER REFERENCES bale_types(id);
-- +goose StatementEnd
-- +goose StatementBegin
CREATE INDEX IF NOT EXISTS idx_bales_type_id ON bales(type_id);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
ALTER TABLE bales DROP COLUMN IF NOT EXISTS type_id;
-- +goose StatementEnd
-- +goose StatementBegin
DROP TABLE IF EXISTS bale_types;
-- +goose StatementEnd