Skip to content
This repository was archived by the owner on Oct 8, 2023. It is now read-only.

Commit 198f45f

Browse files
authored
move to sqlite (#322)
1 parent ec987ce commit 198f45f

File tree

8 files changed

+10
-123
lines changed

8 files changed

+10
-123
lines changed

backend/keystone.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { config } from '@keystone-6/core';
44
import { statelessSessions } from '@keystone-6/core/session';
55
import Auth0 from '@opensaas/keystone-nextjs-auth/providers/auth0';
66
import { createAuth } from '@opensaas/keystone-nextjs-auth';
7-
import { KeystoneContext } from '@keystone-6/core/types';
87
import { lists } from './schemas';
98
import { permissionsList } from './schemas/permissionFields';
109

@@ -53,14 +52,11 @@ export default auth.withAuth(
5352
},
5453
},
5554
db: {
56-
provider: 'postgresql',
57-
url:
58-
process.env.DATABASE_URL ||
59-
'postgres://postgres:mysecretpassword@localhost:55000/opensaas-local',
60-
useMigrations: true,
55+
provider: 'sqlite',
56+
url: process.env.DATABASE_URL || 'file:./dev.db',
6157
},
6258
ui: {
63-
isAccessAllowed: (context: KeystoneContext) => !!context.session,
59+
isAccessAllowed: context => !!context.session,
6460
publicPages: ['/admin/auth/signin', '/admin/auth/error'],
6561
getAdditionalFiles: [
6662
async () => [

backend/migrations/20210629111049_init_migration/migration.sql

Lines changed: 0 additions & 36 deletions
This file was deleted.

backend/migrations/20210908063031_keystone25_upgrade/migration.sql

Lines changed: 0 additions & 11 deletions
This file was deleted.

backend/migrations/20211005064428_keystone_26/migration.sql

Lines changed: 0 additions & 47 deletions
This file was deleted.

backend/migrations/20211101093015_subject_unique/migration.sql

Lines changed: 0 additions & 11 deletions
This file was deleted.

backend/migrations/migration_lock.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

backend/schema.graphql

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,9 @@ input StringFilter {
5555
contains: String
5656
startsWith: String
5757
endsWith: String
58-
mode: QueryMode
5958
not: NestedStringFilter
6059
}
6160

62-
enum QueryMode {
63-
default
64-
insensitive
65-
}
66-
6761
input NestedStringFilter {
6862
equals: String
6963
in: [String!]
@@ -325,6 +319,11 @@ enum KeystoneAdminUIFieldMetaItemViewFieldPosition {
325319
sidebar
326320
}
327321

322+
enum QueryMode {
323+
default
324+
insensitive
325+
}
326+
328327
type KeystoneAdminUIFieldGroupMeta {
329328
label: String!
330329
description: String

backend/schema.prisma

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// This file is automatically generated by Keystone, do not modify it manually.
22
// Modify your Keystone config when you want to change this.
33

4-
datasource postgresql {
4+
datasource sqlite {
55
url = env("DATABASE_URL")
66
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
7-
provider = "postgresql"
7+
provider = "sqlite"
88
}
99

1010
generator client {

0 commit comments

Comments
 (0)