Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Drizzle] Add more tests #1407

Draft
wants to merge 78 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
b7c53e9
Experimental ORM check for pgroll
SferaDev Jan 31, 2024
9c3f594
Update
SferaDev Feb 1, 2024
152e3f7
Update
SferaDev Feb 5, 2024
a50e902
Update
SferaDev Feb 5, 2024
c7964f1
Update `pgroll` schema for `alter_column` (#1343)
SferaDev Feb 1, 2024
2210e2f
Add github action to update pgroll spec (#1345)
SferaDev Feb 2, 2024
685f2b8
Install tsx on workflow (#1346)
SferaDev Feb 2, 2024
5528493
Update pgroll spec (#1351)
xata-bot Feb 2, 2024
aba29fd
Update dependencies (#1352)
SferaDev Feb 7, 2024
c69e362
Force npmjs snapshots (#1353)
SferaDev Feb 5, 2024
412fa1e
timeout to build job (#1349)
eemmiillyy Feb 5, 2024
0672b6d
feat: pgroll migration format (#1350)
eemmiillyy Feb 5, 2024
ef60e40
[OpenAPI] Spec updates (#1354)
xata-bot Feb 6, 2024
5547cda
[OpenAPI] Spec updates (#1355)
xata-bot Feb 6, 2024
a1600d8
Revamp drizzle drivers
SferaDev Feb 7, 2024
251bfae
Merge remote-tracking branch 'origin/main' into drizzle-pure-sql-test
SferaDev Feb 7, 2024
93f7713
Update test suite
SferaDev Feb 7, 2024
c6aa138
Apply suggestions from code review
SferaDev Feb 7, 2024
d6565a4
Update test
SferaDev Feb 7, 2024
b0e1a7d
Update import
SferaDev Feb 7, 2024
efb2ac6
Wrap in describe
SferaDev Feb 7, 2024
a161abc
Add concurrency
SferaDev Feb 7, 2024
1af08d3
Fix SSL problem with staging
SferaDev Feb 7, 2024
afec17e
Fix test
SferaDev Feb 7, 2024
e3a3761
Make them concurrent
SferaDev Feb 7, 2024
2d7a05d
Skip tests that are failing
SferaDev Feb 8, 2024
d21ada6
Update test
SferaDev Feb 8, 2024
c397ef3
Update migrate code
SferaDev Feb 8, 2024
58786f3
Merge branch 'main' into drizzle-pure-sql-test
SferaDev Feb 8, 2024
7ab1fbe
Rename test
SferaDev Feb 8, 2024
1cc8a90
Enable skipped tests
SferaDev Feb 9, 2024
d585755
Merge branch 'main' into drizzle-pure-sql-test
SferaDev Feb 9, 2024
248bb57
Update tests
SferaDev Feb 19, 2024
296af44
Update tests
SferaDev Feb 19, 2024
576c1fe
Merge remote-tracking branch 'origin/main' into drizzle-pure-sql-test
SferaDev Feb 19, 2024
945daa4
Merge branch 'main' into drizzle-pure-sql-test
SferaDev Feb 20, 2024
397b46f
Add support for array response type
SferaDev Feb 20, 2024
cf45f35
Update test
SferaDev Feb 20, 2024
fea0a25
Disable SQL tests with breaking change (#1377)
SferaDev Feb 20, 2024
002e1b5
Use new responseType param
SferaDev Feb 20, 2024
794db33
Update sessions
SferaDev Feb 20, 2024
1e59dfb
Merge remote-tracking branch 'origin/main' into drizzle-pure-sql-test
SferaDev Feb 23, 2024
0bf59f4
Enable SSL in tests
SferaDev Feb 23, 2024
c42ba17
Update client
SferaDev Feb 26, 2024
92101ca
Merge branch 'main' into drizzle-pure-sql-test
SferaDev Feb 26, 2024
22b08e8
Apply suggestions from code review
SferaDev Feb 26, 2024
32eb096
Update test matrix
SferaDev Feb 26, 2024
e4650f2
Run migrations via pg only for now
SferaDev Feb 26, 2024
42cf85b
Update dependencies
SferaDev Feb 26, 2024
751d0d2
Fix build
SferaDev Feb 26, 2024
f493ff3
Merge remote-tracking branch 'origin/main' into drizzle-pure-sql-test
SferaDev Feb 27, 2024
d4856d4
Merge remote-tracking branch 'origin/main' into drizzle-pure-sql-test
SferaDev Feb 27, 2024
0ae148b
Update tests
SferaDev Feb 27, 2024
276059e
Update changesets
SferaDev Feb 27, 2024
bfc9497
Add exports for pg
SferaDev Mar 1, 2024
6bb701a
Remove transaction tests
SferaDev Mar 5, 2024
c456a04
Enable http tests
SferaDev Mar 5, 2024
8d2adaa
Merge remote-tracking branch 'origin/main' into drizzle-pure-sql-test
SferaDev Mar 5, 2024
2df9986
Updates to drivers
SferaDev Mar 7, 2024
692c915
Merge branch 'main' into drizzle-pure-sql-test
SferaDev Mar 8, 2024
7261393
Delete .changeset/serious-eels-grow.md
SferaDev Mar 8, 2024
678f41e
Apply suggestions from code review
SferaDev Mar 8, 2024
fa9fe8c
Update dependencies
SferaDev Mar 11, 2024
26b4ca6
Pin drizzle
SferaDev Mar 11, 2024
c867dab
Update dev dep
SferaDev Mar 11, 2024
f973e5e
Merge branch 'update-dependencies-8228382600' into drizzle-pure-sql-test
SferaDev Mar 11, 2024
5b96057
Move pg to dev dep
SferaDev Mar 11, 2024
e4d5159
Merge remote-tracking branch 'origin/main' into drizzle-pure-sql-test
SferaDev Mar 11, 2024
79c9cbf
[Drizzle] Add more tests
SferaDev Mar 12, 2024
2b08235
Merge remote-tracking branch 'origin/main' into breaking-date-drizzle
SferaDev Mar 12, 2024
48ea182
Update tests
SferaDev Mar 12, 2024
47f4679
Merge remote-tracking branch 'origin/main' into breaking-date-drizzle
SferaDev Mar 19, 2024
e61d301
Update tests
SferaDev Mar 19, 2024
5fc831f
Code clean-up
SferaDev Mar 19, 2024
ecf4e8a
Update tests
SferaDev Mar 19, 2024
469e5f8
Update tests
SferaDev Mar 19, 2024
d181c74
Merge remote-tracking branch 'origin/main' into breaking-date-drizzle
SferaDev Mar 28, 2024
1be866d
Update tests
SferaDev Mar 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/plugin-client-drizzle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
},
"devDependencies": {
"@types/pg": "^8.11.4",
"drizzle-orm": "^0.30.4",
"pg": "^8.11.3"
"drizzle-orm": "^0.30.5",
"pg": "^8.11.3",
"uuid": "^9.0.1"
},
"peerDependencies": {
"drizzle-orm": "*"
Expand Down
93 changes: 93 additions & 0 deletions packages/plugin-client-drizzle/test/core.schema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import {
boolean,
char,
cidr,
inet,
integer,
jsonb,
macaddr,
macaddr8,
pgTable,
serial,
text,
timestamp
} from 'drizzle-orm/pg-core';

export const usersTable = pgTable('users', {
id: serial('id' as string).primaryKey(),
name: text('name').notNull(),
verified: boolean('verified').notNull().default(false),
jsonb: jsonb('jsonb').$type<string[]>(),
createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow()
});

export const citiesTable = pgTable('cities', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
state: char('state', { length: 2 })
});

export const cities2Table = pgTable('cities', {
id: serial('id').primaryKey(),
name: text('name').notNull()
});

export const users2Table = pgTable('users2', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
cityId: integer('city_id').references(() => citiesTable.id)
});

export const coursesTable = pgTable('courses', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
categoryId: integer('category_id').references(() => courseCategoriesTable.id)
});

export const courseCategoriesTable = pgTable('course_categories', {
id: serial('id').primaryKey(),
name: text('name').notNull()
});

export const orders = pgTable('orders', {
id: serial('id').primaryKey(),
region: text('region').notNull(),
product: text('product')
.notNull()
.$default(() => 'random_string'),
amount: integer('amount').notNull(),
quantity: integer('quantity').notNull()
});

export const network = pgTable('network_table', {
inet: inet('inet').notNull(),
cidr: cidr('cidr').notNull(),
macaddr: macaddr('macaddr').notNull(),
macaddr8: macaddr8('macaddr8').notNull()
});

export const salEmp = pgTable('sal_emp', {
name: text('name'),
payByQuarter: integer('pay_by_quarter').array(),
schedule: text('schedule').array().array()
});

export const _tictactoe = pgTable('tictactoe', {
squares: integer('squares').array(3).array(3)
});

export const usersMigratorTable = pgTable('users12', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
email: text('email').notNull()
});

// To test aggregate functions
export const aggregateTable = pgTable('aggregate_table', {
id: serial('id').notNull(),
name: text('name').notNull(),
a: integer('a'),
b: integer('b'),
c: integer('c'),
nullOnly: integer('null_only')
});
Loading
Loading