@coursebuilder/adapter-drizzle 0.0.5 → 0.0.7
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.
- package/dist/{chunk-RMRO5TA7.js → chunk-22KIKVBY.js} +2 -2
- package/dist/{chunk-PUGK2AEH.js → chunk-4HDU7QIB.js} +3 -2
- package/dist/{chunk-JQFZOCAU.js → chunk-FRNVLW7N.js} +595 -288
- package/dist/{chunk-LLWSIKQV.js → chunk-GFUUJRX7.js} +1 -1
- package/dist/{chunk-NISOQSUL.js → chunk-PFN4YUQZ.js} +2 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +5 -5
- package/dist/lib/mysql/index.cjs +673 -365
- package/dist/lib/mysql/index.cjs.map +1 -1
- package/dist/lib/mysql/index.js +3 -3
- package/dist/lib/mysql/schemas/auth/accounts.cjs +2 -1
- package/dist/lib/mysql/schemas/auth/accounts.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/accounts.js +1 -1
- package/dist/lib/mysql/schemas/auth/permissions.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/permissions.js +1 -1
- package/dist/lib/mysql/schemas/auth/role-permissions.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/role-permissions.js +1 -1
- package/dist/lib/mysql/schemas/auth/roles.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/roles.js +1 -1
- package/dist/lib/mysql/schemas/auth/sessions.cjs +2 -1
- package/dist/lib/mysql/schemas/auth/sessions.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/sessions.js +2 -2
- package/dist/lib/mysql/schemas/auth/user-permissions.cjs +2 -1
- package/dist/lib/mysql/schemas/auth/user-permissions.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/user-permissions.js +1 -1
- package/dist/lib/mysql/schemas/auth/user-roles.cjs +2 -1
- package/dist/lib/mysql/schemas/auth/user-roles.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/user-roles.js +1 -1
- package/dist/lib/mysql/schemas/auth/users.cjs +2 -1
- package/dist/lib/mysql/schemas/auth/users.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/users.js +1 -1
- package/dist/lib/mysql/schemas/communication/communication-preferences.cjs +2 -1
- package/dist/lib/mysql/schemas/communication/communication-preferences.cjs.map +1 -1
- package/dist/lib/mysql/schemas/communication/communication-preferences.js +1 -1
- package/dist/lib/mysql/schemas/content/content-contributions.cjs +2 -1
- package/dist/lib/mysql/schemas/content/content-contributions.cjs.map +1 -1
- package/dist/lib/mysql/schemas/content/content-contributions.js +1 -1
- package/dist/lib/mysql/schemas/content/content-resource-resource.cjs.map +1 -1
- package/dist/lib/mysql/schemas/content/content-resource-resource.js +1 -1
- package/dist/lib/mysql/schemas/content/content-resource.cjs +2 -1
- package/dist/lib/mysql/schemas/content/content-resource.cjs.map +1 -1
- package/dist/lib/mysql/schemas/content/content-resource.js +1 -1
- package/dist/lib/mysql/schemas/content/contribution-types.cjs.map +1 -1
- package/dist/lib/mysql/schemas/content/contribution-types.js +1 -1
- package/dist/lib/sqlite.cjs.map +1 -1
- package/dist/lib/sqlite.d.ts +44 -45
- package/dist/lib/sqlite.js +2 -2
- package/dist/lib/utils.cjs.map +1 -1
- package/dist/lib/utils.d.ts +0 -2
- package/dist/lib/utils.js +1 -1
- package/package.json +10 -6
- package/src/index.ts +1 -1
- package/src/lib/mysql/index.ts +43 -35
- package/src/lib/mysql/schemas/auth/accounts.ts +1 -1
- package/src/lib/mysql/schemas/auth/permissions.ts +1 -1
- package/src/lib/mysql/schemas/auth/role-permissions.ts +2 -2
- package/src/lib/mysql/schemas/auth/roles.ts +1 -1
- package/src/lib/mysql/schemas/auth/sessions.ts +1 -1
- package/src/lib/mysql/schemas/auth/user-permissions.ts +2 -2
- package/src/lib/mysql/schemas/auth/user-roles.ts +2 -2
- package/src/lib/mysql/schemas/auth/users.ts +7 -6
- package/src/lib/mysql/schemas/communication/communication-preferences.ts +3 -3
- package/src/lib/mysql/schemas/content/content-contributions.ts +3 -3
- package/src/lib/mysql/schemas/content/content-resource-resource.ts +1 -1
- package/src/lib/mysql/schemas/content/content-resource.ts +3 -3
- package/src/lib/mysql/schemas/content/contribution-types.ts +1 -1
- package/src/lib/utils.ts +1 -1
package/dist/lib/utils.d.ts
CHANGED
|
@@ -6,8 +6,6 @@ import { DefaultSchema as DefaultSchema$1 } from './pg.js';
|
|
|
6
6
|
import { DefaultSchema as DefaultSchema$2 } from './sqlite.js';
|
|
7
7
|
import 'drizzle-orm';
|
|
8
8
|
import '@coursebuilder/core/adapters';
|
|
9
|
-
import 'drizzle-orm/sqlite-core/table.js';
|
|
10
|
-
import 'drizzle-orm/sqlite-core/index.js';
|
|
11
9
|
|
|
12
10
|
type AnyMySqlDatabase = MySqlDatabase<any, any>;
|
|
13
11
|
type AnyPgDatabase = PgDatabase<any, any, any>;
|
package/dist/lib/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coursebuilder/adapter-drizzle",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Drizzle adapter for Course Builder.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"coursebuilder",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"date-fns": "^2.30.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@auth/core": "^0.28.
|
|
42
|
-
"@coursebuilder/core": "0.0.
|
|
41
|
+
"@auth/core": "^0.28.1",
|
|
42
|
+
"@coursebuilder/core": "0.0.9",
|
|
43
43
|
"@libsql/client": "0.5.6",
|
|
44
44
|
"@types/better-sqlite3": "7.6.9",
|
|
45
45
|
"@types/uuid": "9.0.8",
|
|
@@ -48,14 +48,18 @@
|
|
|
48
48
|
"drizzle-orm": "0.30.2",
|
|
49
49
|
"mysql2": "^3.6.1",
|
|
50
50
|
"postgres": "^3.3.4",
|
|
51
|
-
"tsup": "6.7.0"
|
|
51
|
+
"tsup": "6.7.0",
|
|
52
|
+
"tsx": "^4.7.1"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
55
|
"drizzle-orm": "0.30.x"
|
|
55
56
|
},
|
|
56
57
|
"scripts": {
|
|
57
|
-
"clean": "rm -rf
|
|
58
|
+
"clean": "find . -type d -name \".drizzle\" | xargs rm -rf",
|
|
58
59
|
"build": "tsup",
|
|
59
|
-
"dev": "tsup --watch"
|
|
60
|
+
"dev": "tsup --watch",
|
|
61
|
+
"test": "pnpm test:mysql",
|
|
62
|
+
"test:mysql": "pnpm clean && ./test/mysql/test.sh",
|
|
63
|
+
"test:mysql:watch": "pnpm clean && ./test/mysql/test.sh watch"
|
|
60
64
|
}
|
|
61
65
|
}
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { type CourseBuilderAdapter } from '@coursebuilder/core/adapters'
|
|
|
8
8
|
import {
|
|
9
9
|
createTables as createMySqlTables,
|
|
10
10
|
mySqlDrizzleAdapter,
|
|
11
|
-
} from './lib/mysql'
|
|
11
|
+
} from './lib/mysql/index.js'
|
|
12
12
|
import { pgDrizzleAdapter } from './lib/pg.js'
|
|
13
13
|
import { SQLiteDrizzleAdapter } from './lib/sqlite.js'
|
|
14
14
|
import { type SqlFlavorOptions, type TableFn } from './lib/utils.js'
|
package/src/lib/mysql/index.ts
CHANGED
|
@@ -13,65 +13,71 @@ import { VideoResourceSchema } from '@coursebuilder/core/schemas/video-resource'
|
|
|
13
13
|
import {
|
|
14
14
|
getAccountsRelationsSchema,
|
|
15
15
|
getAccountsSchema,
|
|
16
|
-
} from './schemas/auth/accounts'
|
|
16
|
+
} from './schemas/auth/accounts.js'
|
|
17
17
|
import {
|
|
18
18
|
getPermissionsRelationsSchema,
|
|
19
19
|
getPermissionsSchema,
|
|
20
|
-
} from './schemas/auth/permissions'
|
|
20
|
+
} from './schemas/auth/permissions.js'
|
|
21
21
|
import {
|
|
22
22
|
getRolePermissionsRelationsSchema,
|
|
23
23
|
getRolePermissionsSchema,
|
|
24
|
-
} from './schemas/auth/role-permissions'
|
|
25
|
-
import {
|
|
24
|
+
} from './schemas/auth/role-permissions.js'
|
|
25
|
+
import {
|
|
26
|
+
getRolesRelationsSchema,
|
|
27
|
+
getRolesSchema,
|
|
28
|
+
} from './schemas/auth/roles.js'
|
|
26
29
|
import {
|
|
27
30
|
getSessionRelationsSchema,
|
|
28
31
|
getSessionsSchema,
|
|
29
|
-
} from './schemas/auth/sessions'
|
|
32
|
+
} from './schemas/auth/sessions.js'
|
|
30
33
|
import {
|
|
31
34
|
getUserPermissionsRelationsSchema,
|
|
32
35
|
getUserPermissionsSchema,
|
|
33
|
-
} from './schemas/auth/user-permissions'
|
|
36
|
+
} from './schemas/auth/user-permissions.js'
|
|
34
37
|
import {
|
|
35
38
|
getUserRolesRelationsSchema,
|
|
36
39
|
getUserRolesSchema,
|
|
37
|
-
} from './schemas/auth/user-roles'
|
|
38
|
-
import {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
40
|
+
} from './schemas/auth/user-roles.js'
|
|
41
|
+
import {
|
|
42
|
+
getUsersRelationsSchema,
|
|
43
|
+
getUsersSchema,
|
|
44
|
+
} from './schemas/auth/users.js'
|
|
45
|
+
import { getVerificationTokensSchema } from './schemas/auth/verification-tokens.js'
|
|
46
|
+
import { getCouponSchema } from './schemas/commerce/coupon.js'
|
|
47
|
+
import { getMerchantAccountSchema } from './schemas/commerce/merchant-account.js'
|
|
48
|
+
import { getMerchantChargeSchema } from './schemas/commerce/merchant-charge.js'
|
|
49
|
+
import { getMerchantCouponSchema } from './schemas/commerce/merchant-coupon.js'
|
|
50
|
+
import { getMerchantCustomerSchema } from './schemas/commerce/merchant-customer.js'
|
|
51
|
+
import { getMerchantPriceSchema } from './schemas/commerce/merchant-price.js'
|
|
52
|
+
import { getMerchantProductSchema } from './schemas/commerce/merchant-product.js'
|
|
53
|
+
import { getMerchantSessionSchema } from './schemas/commerce/merchant-session.js'
|
|
54
|
+
import { getPriceSchema } from './schemas/commerce/price.js'
|
|
55
|
+
import { getProductSchema } from './schemas/commerce/product.js'
|
|
56
|
+
import { getPurchaseUserTransferSchema } from './schemas/commerce/purchase-user-transfer.js'
|
|
57
|
+
import { getPurchaseSchema } from './schemas/commerce/purchase.js'
|
|
58
|
+
import { getCommunicationChannelSchema } from './schemas/communication/communication-channel.js'
|
|
59
|
+
import { getCommunicationPreferenceTypesSchema } from './schemas/communication/communication-preference-types.js'
|
|
54
60
|
import {
|
|
55
61
|
getCommunicationPreferencesRelationsSchema,
|
|
56
62
|
getCommunicationPreferencesSchema,
|
|
57
|
-
} from './schemas/communication/communication-preferences'
|
|
63
|
+
} from './schemas/communication/communication-preferences.js'
|
|
58
64
|
import {
|
|
59
65
|
getContentContributionRelationsSchema,
|
|
60
66
|
getContentContributionsSchema,
|
|
61
|
-
} from './schemas/content/content-contributions'
|
|
62
|
-
import {
|
|
63
|
-
getContentResourceRelationsSchema,
|
|
64
|
-
getContentResourceSchema,
|
|
65
|
-
} from './schemas/content/content-resource'
|
|
67
|
+
} from './schemas/content/content-contributions.js'
|
|
66
68
|
import {
|
|
67
69
|
getContentResourceResourceRelationsSchema,
|
|
68
70
|
getContentResourceResourceSchema,
|
|
69
|
-
} from './schemas/content/content-resource-resource'
|
|
71
|
+
} from './schemas/content/content-resource-resource.js'
|
|
72
|
+
import {
|
|
73
|
+
getContentResourceRelationsSchema,
|
|
74
|
+
getContentResourceSchema,
|
|
75
|
+
} from './schemas/content/content-resource.js'
|
|
70
76
|
import {
|
|
71
77
|
getContributionTypesRelationsSchema,
|
|
72
78
|
getContributionTypesSchema,
|
|
73
|
-
} from './schemas/content/contribution-types'
|
|
74
|
-
import { getResourceProgressSchema } from './schemas/content/resource-progress'
|
|
79
|
+
} from './schemas/content/contribution-types.js'
|
|
80
|
+
import { getResourceProgressSchema } from './schemas/content/resource-progress.js'
|
|
75
81
|
|
|
76
82
|
export function getCourseBuilderSchema(mysqlTable: MySqlTableFn) {
|
|
77
83
|
return {
|
|
@@ -185,9 +191,9 @@ export function mySqlDrizzleAdapter(
|
|
|
185
191
|
|
|
186
192
|
const query = sql`
|
|
187
193
|
SELECT
|
|
188
|
-
id as
|
|
189
|
-
CAST(updatedAt AS DATETIME) as
|
|
190
|
-
CAST(createdAt AS DATETIME) as
|
|
194
|
+
id as id,
|
|
195
|
+
CAST(updatedAt AS DATETIME) as updatedAt,
|
|
196
|
+
CAST(createdAt AS DATETIME) as createdAt,
|
|
191
197
|
JSON_EXTRACT (${contentResource.fields}, "$.state") AS state,
|
|
192
198
|
JSON_EXTRACT (${contentResource.fields}, "$.duration") AS duration,
|
|
193
199
|
JSON_EXTRACT (${contentResource.fields}, "$.muxPlaybackId") AS muxPlaybackId,
|
|
@@ -405,6 +411,8 @@ export function mySqlDrizzleAdapter(
|
|
|
405
411
|
.then((res) => res[0] ?? null)
|
|
406
412
|
|
|
407
413
|
await client.delete(users).where(eq(users.id, id))
|
|
414
|
+
await client.delete(sessions).where(eq(sessions.userId, id))
|
|
415
|
+
await client.delete(accounts).where(eq(accounts.userId, id))
|
|
408
416
|
|
|
409
417
|
return user
|
|
410
418
|
},
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
varchar,
|
|
9
9
|
} from 'drizzle-orm/mysql-core'
|
|
10
10
|
|
|
11
|
-
import { getRolePermissionsSchema } from './role-permissions'
|
|
11
|
+
import { getRolePermissionsSchema } from './role-permissions.js'
|
|
12
12
|
|
|
13
13
|
export function getPermissionsSchema(mysqlTable: MySqlTableFn) {
|
|
14
14
|
return mysqlTable(
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
varchar,
|
|
9
9
|
} from 'drizzle-orm/mysql-core'
|
|
10
10
|
|
|
11
|
-
import { getPermissionsSchema } from './permissions'
|
|
12
|
-
import { getRolesSchema } from './roles'
|
|
11
|
+
import { getPermissionsSchema } from './permissions.js'
|
|
12
|
+
import { getRolesSchema } from './roles.js'
|
|
13
13
|
|
|
14
14
|
export function getRolePermissionsSchema(mysqlTable: MySqlTableFn) {
|
|
15
15
|
return mysqlTable(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { relations } from 'drizzle-orm'
|
|
2
2
|
import { index, MySqlTableFn, timestamp, varchar } from 'drizzle-orm/mysql-core'
|
|
3
3
|
|
|
4
|
-
import { getUsersSchema } from './users'
|
|
4
|
+
import { getUsersSchema } from './users.js'
|
|
5
5
|
|
|
6
6
|
export function getSessionsSchema(mysqlTable: MySqlTableFn) {
|
|
7
7
|
return mysqlTable(
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
varchar,
|
|
9
9
|
} from 'drizzle-orm/mysql-core'
|
|
10
10
|
|
|
11
|
-
import { getPermissionsSchema } from './permissions'
|
|
12
|
-
import { getUsersSchema } from './users'
|
|
11
|
+
import { getPermissionsSchema } from './permissions.js'
|
|
12
|
+
import { getUsersSchema } from './users.js'
|
|
13
13
|
|
|
14
14
|
export function getUserPermissionsSchema(mysqlTable: MySqlTableFn) {
|
|
15
15
|
return mysqlTable(
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
varchar,
|
|
9
9
|
} from 'drizzle-orm/mysql-core'
|
|
10
10
|
|
|
11
|
-
import { getRolesSchema } from './roles'
|
|
12
|
-
import { getUsersSchema } from './users'
|
|
11
|
+
import { getRolesSchema } from './roles.js'
|
|
12
|
+
import { getUsersSchema } from './users.js'
|
|
13
13
|
|
|
14
14
|
export function getUserRolesSchema(mysqlTable: MySqlTableFn) {
|
|
15
15
|
return mysqlTable(
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
varchar,
|
|
8
8
|
} from 'drizzle-orm/mysql-core'
|
|
9
9
|
|
|
10
|
-
import { getCommunicationPreferencesSchema } from '../communication/communication-preferences'
|
|
11
|
-
import { getContentContributionsSchema } from '../content/content-contributions'
|
|
12
|
-
import { getContentResourceSchema } from '../content/content-resource'
|
|
13
|
-
import { getAccountsSchema } from './accounts'
|
|
14
|
-
import { getUserPermissionsSchema } from './user-permissions'
|
|
15
|
-
import { getUserRolesSchema } from './user-roles'
|
|
10
|
+
import { getCommunicationPreferencesSchema } from '../communication/communication-preferences.js'
|
|
11
|
+
import { getContentContributionsSchema } from '../content/content-contributions.js'
|
|
12
|
+
import { getContentResourceSchema } from '../content/content-resource.js'
|
|
13
|
+
import { getAccountsSchema } from './accounts.js'
|
|
14
|
+
import { getUserPermissionsSchema } from './user-permissions.js'
|
|
15
|
+
import { getUserRolesSchema } from './user-roles.js'
|
|
16
16
|
|
|
17
17
|
export function getUsersSchema(mysqlTable: MySqlTableFn) {
|
|
18
18
|
return mysqlTable(
|
|
@@ -35,6 +35,7 @@ export function getUsersSchema(mysqlTable: MySqlTableFn) {
|
|
|
35
35
|
(user) => ({
|
|
36
36
|
emailIdx: index('email_idx').on(user.email),
|
|
37
37
|
roleIdx: index('role_idx').on(user.role),
|
|
38
|
+
createdAtIdx: index('created_at_idx').on(user.createdAt),
|
|
38
39
|
}),
|
|
39
40
|
)
|
|
40
41
|
}
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
varchar,
|
|
9
9
|
} from 'drizzle-orm/mysql-core'
|
|
10
10
|
|
|
11
|
-
import { getUsersSchema } from '../auth/users'
|
|
12
|
-
import { getCommunicationChannelSchema } from './communication-channel'
|
|
13
|
-
import { getCommunicationPreferenceTypesSchema } from './communication-preference-types'
|
|
11
|
+
import { getUsersSchema } from '../auth/users.js'
|
|
12
|
+
import { getCommunicationChannelSchema } from './communication-channel.js'
|
|
13
|
+
import { getCommunicationPreferenceTypesSchema } from './communication-preference-types.js'
|
|
14
14
|
|
|
15
15
|
export function getCommunicationPreferencesSchema(mysqlTable: MySqlTableFn) {
|
|
16
16
|
return mysqlTable(
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
varchar,
|
|
8
8
|
} from 'drizzle-orm/mysql-core'
|
|
9
9
|
|
|
10
|
-
import { getUsersSchema } from '../auth/users'
|
|
11
|
-
import { getContentResourceSchema } from './content-resource'
|
|
12
|
-
import { getContributionTypesSchema } from './contribution-types'
|
|
10
|
+
import { getUsersSchema } from '../auth/users.js'
|
|
11
|
+
import { getContentResourceSchema } from './content-resource.js'
|
|
12
|
+
import { getContributionTypesSchema } from './contribution-types.js'
|
|
13
13
|
|
|
14
14
|
export function getContentContributionsSchema(mysqlTable: MySqlTableFn) {
|
|
15
15
|
return mysqlTable(
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
varchar,
|
|
10
10
|
} from 'drizzle-orm/mysql-core'
|
|
11
11
|
|
|
12
|
-
import { getContentResourceSchema } from './content-resource'
|
|
12
|
+
import { getContentResourceSchema } from './content-resource.js'
|
|
13
13
|
|
|
14
14
|
export function getContentResourceResourceSchema(mysqlTable: MySqlTableFn) {
|
|
15
15
|
return mysqlTable(
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
varchar,
|
|
8
8
|
} from 'drizzle-orm/mysql-core'
|
|
9
9
|
|
|
10
|
-
import { getUsersSchema } from '../auth/users'
|
|
11
|
-
import { getContentContributionsSchema } from './content-contributions'
|
|
12
|
-
import { getContentResourceResourceSchema } from './content-resource-resource'
|
|
10
|
+
import { getUsersSchema } from '../auth/users.js'
|
|
11
|
+
import { getContentContributionsSchema } from './content-contributions.js'
|
|
12
|
+
import { getContentResourceResourceSchema } from './content-resource-resource.js'
|
|
13
13
|
|
|
14
14
|
export function getContentResourceSchema(mysqlTable: MySqlTableFn) {
|
|
15
15
|
return mysqlTable(
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
varchar,
|
|
9
9
|
} from 'drizzle-orm/mysql-core'
|
|
10
10
|
|
|
11
|
-
import { getContentContributionsSchema } from './content-contributions'
|
|
11
|
+
import { getContentContributionsSchema } from './content-contributions.js'
|
|
12
12
|
|
|
13
13
|
export function getContributionTypesSchema(mysqlTable: MySqlTableFn) {
|
|
14
14
|
return mysqlTable(
|
package/src/lib/utils.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { AnyPgTable, PgTableFn } from 'drizzle-orm/pg-core'
|
|
|
5
5
|
import { type BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core'
|
|
6
6
|
import type { AnySQLiteTable, SQLiteTableFn } from 'drizzle-orm/sqlite-core'
|
|
7
7
|
|
|
8
|
-
import type { DefaultSchema as MySqlSchema } from './mysql'
|
|
8
|
+
import type { DefaultSchema as MySqlSchema } from './mysql/index.js'
|
|
9
9
|
import type { DefaultSchema as PgSchema } from './pg.js'
|
|
10
10
|
import type { DefaultSchema as SQLiteSchema } from './sqlite.js'
|
|
11
11
|
|