Browse Source

fix(nc-gui): Added display_name to OSS side with that migration being disabled on EE side

pull/6376/head
Muhammed Mustafa 12 months ago
parent
commit
ef4657517d
  1. 4
      packages/nocodb/src/meta/migrations/XcMigrationSourcev2.ts
  2. 24
      packages/nocodb/src/meta/migrations/v2/nc_035_add_username_to_users.ts

4
packages/nocodb/src/meta/migrations/XcMigrationSourcev2.ts

@ -21,6 +21,7 @@ import * as nc_030_add_description_field from './v2/nc_030_add_description_field
import * as nc_031_remove_fk_and_add_idx from './v2/nc_031_remove_fk_and_add_idx';
import * as nc_033_add_group_by from './v2/nc_033_add_group_by';
import * as nc_034_erd_filter_and_notification from './v2/nc_034_erd_filter_and_notification';
import * as nc_035_add_username_to_users from './v2/nc_035_add_username_to_users';
// Create a custom migration source class
export default class XcMigrationSourcev2 {
@ -53,6 +54,7 @@ export default class XcMigrationSourcev2 {
'nc_031_remove_fk_and_add_idx',
'nc_033_add_group_by',
'nc_034_erd_filter_and_notification',
'nc_035_add_username_to_users',
]);
}
@ -108,6 +110,8 @@ export default class XcMigrationSourcev2 {
return nc_033_add_group_by;
case 'nc_034_erd_filter_and_notification':
return nc_034_erd_filter_and_notification;
case 'nc_035_add_username_to_users':
return nc_035_add_username_to_users;
}
}
}

24
packages/nocodb/src/meta/migrations/v2/nc_035_add_username_to_users.ts

@ -0,0 +1,24 @@
import type { Knex } from 'knex';
import { MetaTable } from '~/utils/globals';
const up = async (knex: Knex) => {
await knex.schema.alterTable(MetaTable.USERS, (table) => {
table.string('display_name');
table.string('user_name');
table.dropColumn('firstname');
table.dropColumn('lastname');
table.dropColumn('username');
});
};
const down = async (knex: Knex) => {
await knex.schema.alterTable(MetaTable.USERS, (table) => {
table.dropColumn('display_name');
table.dropColumn('user_name');
table.string('firstname');
table.string('lastname');
table.string('username');
});
};
export { up, down };
Loading…
Cancel
Save