adminizer 4.4.0-build.165 → 4.4.0-build.166
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.
|
@@ -142,10 +142,11 @@ export async function up(knex) {
|
|
|
142
142
|
// M:N join: GroupAP <-> UserAP via "groupap_users__userap_groups"
|
|
143
143
|
// Waterline naming convention: {model1}_{collection1}__{model2}_{collection2}
|
|
144
144
|
// GroupAP.users -> UserAP.groups => groupap_users__userap_groups
|
|
145
|
+
// Column naming: {model}_{collection} references the TARGET model
|
|
145
146
|
await knex.schema.createTable("groupap_users__userap_groups", (table) => {
|
|
146
147
|
table.increments("id").primary().notNullable();
|
|
147
|
-
table.integer("groupap_users").notNullable().references("id").inTable("
|
|
148
|
-
table.integer("userap_groups").notNullable().references("id").inTable("
|
|
148
|
+
table.integer("groupap_users").notNullable().references("id").inTable("groupap");
|
|
149
|
+
table.integer("userap_groups").notNullable().references("id").inTable("userap");
|
|
149
150
|
table.timestamp("createdAt", { useTz: false }).notNullable().defaultTo(defaultTimestamp);
|
|
150
151
|
table.timestamp("updatedAt", { useTz: false }).notNullable().defaultTo(defaultTimestamp);
|
|
151
152
|
});
|