@loomcore/api 0.1.143 → 0.1.145
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.
|
@@ -83,17 +83,14 @@ export const getPostgresInitialSchema = (dbConfig) => {
|
|
|
83
83
|
"_deleted" TIMESTAMPTZ,
|
|
84
84
|
"_deletedBy" INTEGER,
|
|
85
85
|
${personsUniqueConstraints}
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
`);
|
|
86
|
+
)`);
|
|
87
|
+
await pool.query(`CREATE INDEX IF NOT EXISTS "idx_persons_external_id" ON "persons" ("external_id")`);
|
|
88
|
+
await pool.query(`CREATE INDEX IF NOT EXISTS "idx_persons_ssn" ON "persons" ("ssn")`);
|
|
90
89
|
},
|
|
91
90
|
down: async ({ context: pool }) => {
|
|
92
|
-
await pool.query(`
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
DROP TABLE IF EXISTS "persons"
|
|
96
|
-
`);
|
|
91
|
+
await pool.query(`DROP INDEX IF EXISTS "idx_persons_external_id"`);
|
|
92
|
+
await pool.query(`DROP INDEX IF EXISTS "idx_persons_ssn"`);
|
|
93
|
+
await pool.query(`DROP TABLE IF EXISTS "persons"`);
|
|
97
94
|
}
|
|
98
95
|
});
|
|
99
96
|
if (isAuthEnabled)
|
|
@@ -124,19 +121,16 @@ export const getPostgresInitialSchema = (dbConfig) => {
|
|
|
124
121
|
"_deleted" TIMESTAMPTZ,
|
|
125
122
|
"_deletedBy" INTEGER,
|
|
126
123
|
${uniqueConstraint}
|
|
127
|
-
);
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
`);
|
|
124
|
+
)`);
|
|
125
|
+
await pool.query(`CREATE INDEX IF NOT EXISTS "idx_users_external_id" ON "users"("external_id")`);
|
|
126
|
+
await pool.query(`CREATE INDEX IF NOT EXISTS "idx_users_email" ON "users"("email")`);
|
|
127
|
+
await pool.query(`CREATE INDEX IF NOT EXISTS "idx_users_person_id" ON "users"("person_id")`);
|
|
132
128
|
},
|
|
133
129
|
down: async ({ context: pool }) => {
|
|
134
|
-
await pool.query(`
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
DROP TABLE IF EXISTS "users"
|
|
139
|
-
`);
|
|
130
|
+
await pool.query(`DROP INDEX IF EXISTS "idx_users_external_id"`);
|
|
131
|
+
await pool.query(`DROP INDEX IF EXISTS "idx_users_email"`);
|
|
132
|
+
await pool.query(`DROP INDEX IF EXISTS "idx_users_person_id"`);
|
|
133
|
+
await pool.query(`DROP TABLE IF EXISTS "users"`);
|
|
140
134
|
}
|
|
141
135
|
});
|
|
142
136
|
if (isAuthEnabled)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loomcore/api",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.145",
|
|
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": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"qs": "^6.15.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@loomcore/common": "^0.0.
|
|
61
|
+
"@loomcore/common": "^0.0.67",
|
|
62
62
|
"@sinclair/typebox": "0.34.33",
|
|
63
63
|
"cookie-parser": "^1.4.6",
|
|
64
64
|
"cors": "^2.8.5",
|