@loomcore/api 0.2.13 → 0.2.14

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.
@@ -27,7 +27,7 @@ export const getMongoInitialSchema = (dbConfig) => {
27
27
  },
28
28
  });
29
29
  migrations.push({
30
- name: "00000000000001_schema-organization-domains",
30
+ name: "00000000000001_schema-organizations-domains",
31
31
  up: async ({ context: db }) => {
32
32
  await db.createCollection("organization_domains");
33
33
  await db
@@ -22,7 +22,7 @@ export async function runInitialSchemaMigrations(pool, config) {
22
22
  down: async () => {
23
23
  await m.down({ context: pool });
24
24
  }
25
- }));
25
+ })).sort((a, b) => a.name.localeCompare(b.name));
26
26
  },
27
27
  context: pool,
28
28
  storage: {
@@ -54,7 +54,7 @@ export async function runTestSchemaMigrations(pool, config) {
54
54
  down: async () => {
55
55
  await m.down({ context: pool });
56
56
  }
57
- }));
57
+ })).sort((a, b) => a.name.localeCompare(b.name));
58
58
  },
59
59
  context: pool,
60
60
  storage: {
@@ -52,7 +52,7 @@ export const getPostgresInitialSchema = (dbConfig) => {
52
52
  },
53
53
  });
54
54
  migrations.push({
55
- name: "00000000000002_schema-organization-domains",
55
+ name: "00000000000002_schema-organizations-domains",
56
56
  up: async ({ context: pool }) => {
57
57
  await pool.query(`
58
58
  CREATE TABLE IF NOT EXISTS "organization_domains" (
@@ -69,10 +69,8 @@ export const getPostgresInitialSchema = (dbConfig) => {
69
69
  FOREIGN KEY("organization_id") REFERENCES "organizations"("_id") ON DELETE CASCADE
70
70
  )
71
71
  `);
72
- await pool.query(`CREATE INDEX IF NOT EXISTS "idx_organization_domains_organization_id" ON "organization_domains"("organization_id")`);
73
72
  },
74
73
  down: async ({ context: pool }) => {
75
- await pool.query(`DROP INDEX IF EXISTS "idx_organization_domains_organization_id"`);
76
74
  await pool.query('DROP TABLE IF EXISTS "organization_domains"');
77
75
  },
78
76
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomcore/api",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "private": false,
5
5
  "description": "Loom Core Api - An opinionated Node.js api using Typescript, Express, and MongoDb or PostgreSQL",
6
6
  "scripts": {