Assign production plans to Graphs users
This commit is contained in:
@@ -792,6 +792,13 @@ const initDB = async () => {
|
||||
ALTER COLUMN updated_at SET DEFAULT CURRENT_TIMESTAMP;
|
||||
`).catch(() => {});
|
||||
|
||||
// A production plan is operated by a Graphs user. The ID link will let
|
||||
// role-based assignments be added without changing historical plans.
|
||||
await pool.query(`
|
||||
ALTER TABLE production_plans
|
||||
ADD COLUMN IF NOT EXISTS responsible_user_id INTEGER REFERENCES app_users(id) ON DELETE SET NULL;
|
||||
`).catch(() => {});
|
||||
|
||||
await pool.query(`
|
||||
ALTER TABLE stock_campaign_queue
|
||||
ALTER COLUMN created_at TYPE TIMESTAMPTZ USING created_at AT TIME ZONE 'America/Sao_Paulo',
|
||||
|
||||
Reference in New Issue
Block a user