feat(F-105): completed feature
This commit is contained in:
15
project/migrations/035_users_preferences.js
Normal file
15
project/migrations/035_users_preferences.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Adds a JSONB preferences column to users_profiles so customers can manage
|
||||
* notification/marketing preferences from their account page.
|
||||
* @param {import('node-pg-migrate').MigrationBuilder} pgm
|
||||
*/
|
||||
export const up = (pgm) => {
|
||||
pgm.sql(`
|
||||
ALTER TABLE users_profiles
|
||||
ADD COLUMN IF NOT EXISTS preferences jsonb NOT NULL DEFAULT '{}'::jsonb
|
||||
`);
|
||||
};
|
||||
|
||||
export const down = (pgm) => {
|
||||
pgm.sql(`ALTER TABLE users_profiles DROP COLUMN IF EXISTS preferences`);
|
||||
};
|
||||
Reference in New Issue
Block a user