Skip to content

Commit cb46b79

Browse files
committed
Merge commit 'cbe869af1d76fabc1a10779a7d6a8c6a1bf21c8c' into alternation-engine
2 parents 4da4846 + cbe869a commit cb46b79

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

drizzle-kit/src/dialects/mysql/introspect.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const fromDatabase = async (
7373
SELECT
7474
*
7575
FROM information_schema.columns
76-
WHERE table_schema = '${schema}' and table_name !== '__drizzle_migrations'
76+
WHERE table_schema = '${schema}' and table_name != '__drizzle_migrations'
7777
ORDER BY lower(table_name), ordinal_position;
7878
`).then((rows) => {
7979
const filtered = rows.filter((it) => tablesAndViews.some((x) => it['TABLE_NAME'] === x.name));
@@ -89,7 +89,7 @@ export const fromDatabase = async (
8989
*
9090
FROM INFORMATION_SCHEMA.STATISTICS
9191
WHERE INFORMATION_SCHEMA.STATISTICS.TABLE_SCHEMA = '${schema}'
92-
AND INFORMATION_SCHEMA.STATISTICS.INDEX_NAME !== 'PRIMARY'
92+
AND INFORMATION_SCHEMA.STATISTICS.INDEX_NAME != 'PRIMARY'
9393
ORDER BY lower(INDEX_NAME);
9494
`).then((rows) => {
9595
const filtered = rows.filter((it) => tablesAndViews.some((x) => it['TABLE_NAME'] === x.name));
@@ -206,7 +206,7 @@ export const fromDatabase = async (
206206
FROM information_schema.table_constraints t
207207
LEFT JOIN information_schema.key_column_usage k USING(constraint_name,table_schema,table_name)
208208
WHERE t.constraint_type='PRIMARY KEY'
209-
AND table_name !== '__drizzle_migrations'
209+
AND table_name != '__drizzle_migrations'
210210
AND t.table_schema = '${schema}'
211211
ORDER BY ordinal_position
212212
`).then((rows) => {
@@ -259,7 +259,7 @@ export const fromDatabase = async (
259259
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE kcu
260260
LEFT JOIN information_schema.referential_constraints rc ON kcu.CONSTRAINT_NAME = rc.CONSTRAINT_NAME
261261
WHERE kcu.TABLE_SCHEMA = '${schema}'
262-
AND kcu.CONSTRAINT_NAME !== 'PRIMARY'
262+
AND kcu.CONSTRAINT_NAME != 'PRIMARY'
263263
AND kcu.REFERENCED_TABLE_NAME IS NOT NULL;
264264
`).then((rows) => {
265265
queryCallback('fks', rows, null);

drizzle-kit/src/dialects/sqlite/introspect.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ export const fromDatabase = async (
236236
const dbTablesWithSequences = await db.query<{
237237
name: string;
238238
}>(
239-
`SELECT * FROM sqlite_master WHERE name !== 'sqlite_sequence'
240-
and name !== 'sqlite_stat1'
241-
and name !== '_litestream_seq'
242-
and name !== '_litestream_lock'
243-
and tbl_name !== '_cf_KV'
239+
`SELECT * FROM sqlite_master WHERE name != 'sqlite_sequence'
240+
and name != 'sqlite_stat1'
241+
and name != '_litestream_seq'
242+
and name != '_litestream_lock'
243+
and tbl_name != '_cf_KV'
244244
and sql GLOB '*[ *' || CHAR(9) || CHAR(10) || CHAR(13) || ']AUTOINCREMENT[^'']*';`,
245245
).then((tables) => {
246246
queryCallback('tablesWithSequences', tables, null);
@@ -274,7 +274,7 @@ export const fromDatabase = async (
274274
pragma_index_info(il.name) AS ii
275275
WHERE
276276
m.type = 'table'
277-
and m.tbl_name !== '_cf_KV'
277+
and m.tbl_name != '_cf_KV'
278278
ORDER BY m.name COLLATE NOCASE;
279279
`).then((indexes) => {
280280
queryCallback('indexes', indexes, null);
@@ -483,7 +483,7 @@ export const fromDatabase = async (
483483
f."on_delete" as "onDelete",
484484
f.seq as "seq"
485485
FROM sqlite_master m, pragma_foreign_key_list(m.name) as f
486-
WHERE m.tbl_name !== '_cf_KV';`,
486+
WHERE m.tbl_name != '_cf_KV';`,
487487
).then((fks) => {
488488
queryCallback('fks', fks, null);
489489
return fks.filter((it) => filter({ type: 'table', schema: false, name: it.tableFrom }));

0 commit comments

Comments
 (0)