- Add inventory_date and inventory_workstation columns to
asset.copy table.
Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
Changes to be committed:
modified: Open-ILS/src/sql/Pg/040.schema.asset.sql
new file: Open-ILS/src/sql/Pg/upgrade/XXXX-create-inventory-workstation-and-date-columns.sql
status_changed_time TIMESTAMP WITH TIME ZONE,
active_date TIMESTAMP WITH TIME ZONE,
mint_condition BOOL NOT NULL DEFAULT TRUE,
- cost NUMERIC(8,2)
+ cost NUMERIC(8,2),
+ inventory_workstation INT REFERENCES actor.workstation (id) DEFERRABLE INITIALLY DEFERRED,
+ inventory_date TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE UNIQUE INDEX copy_barcode_key ON asset.copy (barcode) WHERE deleted = FALSE OR deleted IS FALSE;
CREATE INDEX cp_cn_idx ON asset.copy (call_number);
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+ALTER TABLE asset.copy
+ ADD COLUMN inventory_workstation INT REFERENCES actor.workstation (id) DEFERRABLE INITIALLY DEFERRED,
+ ADD COLUMN inventory_date TIMESTAMP WITH TIME ZONE DEFAULT NOW();
+
+COMMIT;
\ No newline at end of file