adminizer 4.4.0-build.163 → 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.
@@ -68,7 +68,7 @@ export async function up(knex) {
68
68
  else {
69
69
  table.uuid("id").primary().notNullable();
70
70
  }
71
- table.uuid("parentId").nullable().references("id").inTable("mediamanagerap").onDelete("SET NULL");
71
+ table.uuid("parentId").nullable().references("id").inTable("mediamanagerap");
72
72
  table.string("mimeType");
73
73
  table.string("path");
74
74
  table.integer("size");
@@ -90,7 +90,7 @@ export async function up(knex) {
90
90
  table.string("key");
91
91
  table.json("value");
92
92
  table.boolean("isPublic");
93
- table.uuid("parentId").nullable().references("id").inTable("mediamanagerap").onDelete("SET NULL");
93
+ table.uuid("parentId").nullable().references("id").inTable("mediamanagerap");
94
94
  table.timestamp("createdAt", { useTz: false }).notNullable().defaultTo(defaultTimestamp);
95
95
  table.timestamp("updatedAt", { useTz: false }).notNullable().defaultTo(defaultTimestamp);
96
96
  });
@@ -107,7 +107,7 @@ export async function up(knex) {
107
107
  table.json("modelId");
108
108
  table.string("widgetName");
109
109
  table.integer("sortOrder");
110
- table.uuid("fileId").nullable().references("id").inTable("mediamanagerap").onDelete("SET NULL");
110
+ table.uuid("fileId").nullable().references("id").inTable("mediamanagerap");
111
111
  table.timestamp("createdAt", { useTz: false }).notNullable().defaultTo(defaultTimestamp);
112
112
  table.timestamp("updatedAt", { useTz: false }).notNullable().defaultTo(defaultTimestamp);
113
113
  });
@@ -126,7 +126,7 @@ export async function up(knex) {
126
126
  await knex.schema.createTable("usernotificationap", (table) => {
127
127
  table.increments("id").primary().notNullable();
128
128
  table.integer("userId");
129
- table.integer("notificationIdId").nullable().references("id").inTable("notificationap").onDelete("SET NULL");
129
+ table.integer("notificationIdId").nullable().references("id").inTable("notificationap");
130
130
  table.boolean("read");
131
131
  table.timestamp("createdAt", { useTz: false }).notNullable().defaultTo(defaultTimestamp);
132
132
  table.timestamp("updatedAt", { useTz: false }).notNullable().defaultTo(defaultTimestamp);
@@ -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 "groupapuserap"
143
- await knex.schema.createTable("groupapuserap", (table) => {
144
- table.integer("UserAPId").notNullable().references("id").inTable("userap").onDelete("CASCADE");
145
- table.integer("GroupAPId").notNullable().references("id").inTable("groupap").onDelete("CASCADE");
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("groupapuserap");
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");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adminizer",
3
3
  "type": "module",
4
- "version": "4.4.0-build.163",
4
+ "version": "4.4.0-build.165",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  ".": "./index.js",