@autofleet/sadot 0.13.2-beta.4 → 0.13.2-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/models/test.js +9 -0
- package/package.json +1 -1
- package/src/models/index.ts +4 -8
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const SADOT_MIGRATION_PREFIX = 'sadot-migration';
|
|
2
|
+
const SCHEMA_VERSION = '49c9dd1d-b1cc-445b-a911-fd349d783110';
|
|
3
|
+
const initTables = async ({ schemaPrefix = SADOT_MIGRATION_PREFIX, schemaVersion = SCHEMA_VERSION, useCustomFieldsEntries = false }) => {
|
|
4
|
+
console.log('custom-fields: initialize custom-fields tables', {
|
|
5
|
+
schemaPrefix, schemaVersion, useCustomFieldsEntries,
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
initTables({useCustomFieldsEntries: true});
|
package/package.json
CHANGED
package/src/models/index.ts
CHANGED
|
@@ -29,14 +29,10 @@ const initTables = async (
|
|
|
29
29
|
sequelize: Sequelize,
|
|
30
30
|
getUser: CustomFieldOptions['getUser'],
|
|
31
31
|
{
|
|
32
|
-
schemaPrefix,
|
|
33
|
-
schemaVersion,
|
|
34
|
-
useCustomFieldsEntries,
|
|
35
|
-
}: InitTablesOptions
|
|
36
|
-
schemaPrefix: SADOT_MIGRATION_PREFIX,
|
|
37
|
-
schemaVersion: SCHEMA_VERSION,
|
|
38
|
-
useCustomFieldsEntries: false,
|
|
39
|
-
},
|
|
32
|
+
schemaPrefix = SADOT_MIGRATION_PREFIX,
|
|
33
|
+
schemaVersion = SCHEMA_VERSION,
|
|
34
|
+
useCustomFieldsEntries = false,
|
|
35
|
+
}: InitTablesOptions,
|
|
40
36
|
): Promise<void> => {
|
|
41
37
|
const CUSTOM_FIELDS_SCHEMA_VERSION = `${schemaPrefix}_${schemaVersion}${useCustomFieldsEntries ? '_withEntries' : ''}`;
|
|
42
38
|
logger.info('custom-fields: initialize custom-fields tables');
|