adminizer 4.4.0-build.164 → 4.4.0-build.165
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.
|
@@ -139,17 +139,19 @@ export async function up(knex) {
|
|
|
139
139
|
table.timestamp("createdAt", { useTz: false }).notNullable().defaultTo(defaultTimestamp);
|
|
140
140
|
table.timestamp("updatedAt", { useTz: false }).notNullable().defaultTo(defaultTimestamp);
|
|
141
141
|
});
|
|
142
|
-
// M:N join: GroupAP <-> UserAP via "
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
// M:N join: GroupAP <-> UserAP via "groupap_users__userap_groups"
|
|
143
|
+
// Waterline naming convention: {model1}_{collection1}__{model2}_{collection2}
|
|
144
|
+
// GroupAP.users -> UserAP.groups => groupap_users__userap_groups
|
|
145
|
+
await knex.schema.createTable("groupap_users__userap_groups", (table) => {
|
|
146
|
+
table.increments("id").primary().notNullable();
|
|
147
|
+
table.integer("groupap_users").notNullable().references("id").inTable("userap");
|
|
148
|
+
table.integer("userap_groups").notNullable().references("id").inTable("groupap");
|
|
146
149
|
table.timestamp("createdAt", { useTz: false }).notNullable().defaultTo(defaultTimestamp);
|
|
147
150
|
table.timestamp("updatedAt", { useTz: false }).notNullable().defaultTo(defaultTimestamp);
|
|
148
|
-
table.primary(["UserAPId", "GroupAPId"]);
|
|
149
151
|
});
|
|
150
152
|
}
|
|
151
153
|
export async function down(knex) {
|
|
152
|
-
await knex.schema.dropTableIfExists("
|
|
154
|
+
await knex.schema.dropTableIfExists("groupap_users__userap_groups");
|
|
153
155
|
await knex.schema.dropTableIfExists("usernotificationap");
|
|
154
156
|
await knex.schema.dropTableIfExists("mediamanagermetaap");
|
|
155
157
|
await knex.schema.dropTableIfExists("mediamanagerassociationsap");
|