fix(storefront+TPV): storefront live search proxy, product expiry/weight display, TPV receipt popup timestamp
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
/**
|
||||
* Add twitter_url and pinterest_url columns to store_settings table.
|
||||
* Usage: node --env-file=.env -e "require('./migrations/062_settings_twitter_pinterest.js')"
|
||||
*/
|
||||
import { query } from '../src/infrastructure/db/migrate.js';
|
||||
|
||||
async function migrate() {
|
||||
await query(`ALTER TABLE store_settings ADD COLUMN IF NOT EXISTS twitter_url TEXT`);
|
||||
await query(`ALTER TABLE store_settings ADD COLUMN IF NOT EXISTS pinterest_url TEXT`);
|
||||
console.log('✓ Added twitter_url and pinterest_url to store_settings');
|
||||
}
|
||||
/** @param {import('pg-migrate').MigrationBuilder} pgm */
|
||||
export const up = (pgm) => {
|
||||
pgm.addColumn('store_settings', {
|
||||
twitter_url: { type: 'text', notNull: false, default: null },
|
||||
pinterest_url: { type: 'text', notNull: false, default: null },
|
||||
});
|
||||
};
|
||||
|
||||
migrate().catch(e => { console.error(e); process.exit(1); });
|
||||
/** @param {import('pg-migrate').MigrationBuilder} pgm */
|
||||
export const down = (pgm) => {
|
||||
pgm.dropColumn('store_settings', 'twitter_url');
|
||||
pgm.dropColumn('store_settings', 'pinterest_url');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user