mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-25 15:55:44 +00:00
add adjust migration
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE IF NOT EXISTS farm_depreciation_manual_inputs (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
project_flock_id BIGINT NOT NULL
|
||||
REFERENCES project_flocks(id)
|
||||
ON UPDATE CASCADE
|
||||
ON DELETE CASCADE,
|
||||
total_cost NUMERIC(18, 3) NOT NULL DEFAULT 0
|
||||
CHECK (total_cost >= 0),
|
||||
note TEXT NULL,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
CONSTRAINT farm_depreciation_manual_inputs_unique UNIQUE (project_flock_id)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_farm_depreciation_manual_inputs_project_flock_id
|
||||
ON farm_depreciation_manual_inputs (project_flock_id);
|
||||
Reference in New Issue
Block a user