Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions .github/workflows/check-prisma-migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,12 @@ jobs:
- name: Initialize database
run: pnpm run db:init

- name: Remove auto-migration metadata
run: |
cd apps/backend
pnpm run prisma db execute --url postgres://postgres:PASSWORD-PLACEHOLDER--uqfEC1hmmv@localhost:5432/stackframe --stdin <<'SQL'
DROP TABLE IF EXISTS "SchemaMigration";
SQL

- name: Check for differences in Prisma schema and current DB
run: cd apps/backend && pnpm run prisma migrate diff --from-url postgres://postgres:PASSWORD-PLACEHOLDER--uqfEC1hmmv@localhost:5432/stackframe --to-schema-datamodel ./prisma/schema.prisma --shadow-database-url postgres://postgres:PASSWORD-PLACEHOLDER--uqfEC1hmmv@localhost:5432/shadow_db --exit-code
11 changes: 1 addition & 10 deletions apps/backend/prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { errorToNiceString, throwErr } from '@stackframe/stack-shared/dist/utils
const globalPrisma = new PrismaClient();

export async function seed() {
process.env.STACK_SEED_MODE = 'true';
console.log('Seeding database...');

// Optional default admin user
Expand Down Expand Up @@ -471,13 +472,3 @@ export async function seed() {
console.log('Seeding complete!');
}

process.env.STACK_SEED_MODE = 'true';

if (require.main === module) {
seed().catch(async (e) => {
console.error(errorToNiceString(e));
await globalPrisma.$disconnect();
process.exit(1);
// eslint-disable-next-line @typescript-eslint/no-misused-promises
}).finally(async () => await globalPrisma.$disconnect());
}
2 changes: 1 addition & 1 deletion examples/convex/convex/myFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const getUserInfo = query({
const user = await stackServerApp.getPartialUser({ from: "convex", ctx });

if (!user) return "The user is not logged in";
return "The user's name is: " obj.displayName;
return "The user's name is: " + user.displayName;

},
});
Expand Down
Loading