diff --git a/packages/core/src/entity/custom-entity-fields.ts b/packages/core/src/entity/custom-entity-fields.ts index 7f5b6f6e1b..749dd2cc6b 100644 --- a/packages/core/src/entity/custom-entity-fields.ts +++ b/packages/core/src/entity/custom-entity-fields.ts @@ -58,7 +58,7 @@ function registerCustomFieldsForEntity( for (const customField of customFields) { const { name, type } = customField; const registerColumn = () => - Column({ type: getColumnType(dbEngine, type), name })(new ctor(), name); + Column({ type: getColumnType(dbEngine, type), name, nullable: true })(new ctor(), name); if (translation) { if (type === 'localeString') { diff --git a/packages/dev-server/dev-config.ts b/packages/dev-server/dev-config.ts index 717243ca32..a5e7aad72f 100644 --- a/packages/dev-server/dev-config.ts +++ b/packages/dev-server/dev-config.ts @@ -66,6 +66,7 @@ function getDbConfig(): ConnectionOptions { case 'postgres': console.log('Using postgres connection'); return { + synchronize: true, type: 'postgres', host: '127.0.0.1', port: 5432, @@ -83,6 +84,7 @@ function getDbConfig(): ConnectionOptions { default: console.log('Using mysql connection'); return { + synchronize: true, type: 'mysql', host: '192.168.99.100', port: 3306,