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

Commit

Permalink
move to sqlite (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
borisno2 committed May 16, 2023
1 parent ec987ce commit 198f45f
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 123 deletions.
10 changes: 3 additions & 7 deletions backend/keystone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { config } from '@keystone-6/core';
import { statelessSessions } from '@keystone-6/core/session';
import Auth0 from '@opensaas/keystone-nextjs-auth/providers/auth0';
import { createAuth } from '@opensaas/keystone-nextjs-auth';
import { KeystoneContext } from '@keystone-6/core/types';
import { lists } from './schemas';
import { permissionsList } from './schemas/permissionFields';

Expand Down Expand Up @@ -53,14 +52,11 @@ export default auth.withAuth(
},
},
db: {
provider: 'postgresql',
url:
process.env.DATABASE_URL ||
'postgres://postgres:mysecretpassword@localhost:55000/opensaas-local',
useMigrations: true,
provider: 'sqlite',
url: process.env.DATABASE_URL || 'file:./dev.db',
},
ui: {
isAccessAllowed: (context: KeystoneContext) => !!context.session,
isAccessAllowed: context => !!context.session,
publicPages: ['/admin/auth/signin', '/admin/auth/error'],
getAdditionalFiles: [
async () => [
Expand Down
36 changes: 0 additions & 36 deletions backend/migrations/20210629111049_init_migration/migration.sql

This file was deleted.

11 changes: 0 additions & 11 deletions backend/migrations/20210908063031_keystone25_upgrade/migration.sql

This file was deleted.

47 changes: 0 additions & 47 deletions backend/migrations/20211005064428_keystone_26/migration.sql

This file was deleted.

11 changes: 0 additions & 11 deletions backend/migrations/20211101093015_subject_unique/migration.sql

This file was deleted.

3 changes: 0 additions & 3 deletions backend/migrations/migration_lock.toml

This file was deleted.

11 changes: 5 additions & 6 deletions backend/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,9 @@ input StringFilter {
contains: String
startsWith: String
endsWith: String
mode: QueryMode
not: NestedStringFilter
}

enum QueryMode {
default
insensitive
}

input NestedStringFilter {
equals: String
in: [String!]
Expand Down Expand Up @@ -325,6 +319,11 @@ enum KeystoneAdminUIFieldMetaItemViewFieldPosition {
sidebar
}

enum QueryMode {
default
insensitive
}

type KeystoneAdminUIFieldGroupMeta {
label: String!
description: String
Expand Down
4 changes: 2 additions & 2 deletions backend/schema.prisma
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// This file is automatically generated by Keystone, do not modify it manually.
// Modify your Keystone config when you want to change this.

datasource postgresql {
datasource sqlite {
url = env("DATABASE_URL")
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
provider = "postgresql"
provider = "sqlite"
}

generator client {
Expand Down

0 comments on commit 198f45f

Please sign in to comment.