Rajat Mishra
Rajat Mishra
DTDrizzle Team
Created by Rajat Mishra on 11/8/2024 in #help
Drizzle-kit not working as expected
If there is a file xyz.ts and it currently has one table and if I use npx drizzle-kit push it runs sucessfully I add one more table to same file and use the command again it throws error
[itsmishra@Rajat ayanami]$ npx drizzle-kit push
No config path provided, using default 'drizzle.config.ts'
Reading config file '/home/itsmishra/ayanami/drizzle.config.ts'
Using 'pg' driver for database querying
[⢿] Pulling schema from database...
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at /home/itsmishra/ayanami/node_modules/drizzle-kit/bin.cjs:20632:66
at Array.map (<anonymous>)
at defaultForColumn (/home/itsmishra/ayanami/node_modules/drizzle-kit/bin.cjs:20622:74)
at /home/itsmishra/ayanami/node_modules/drizzle-kit/bin.cjs:20219:36
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[itsmishra@Rajat ayanami]$
[itsmishra@Rajat ayanami]$ npx drizzle-kit push
No config path provided, using default 'drizzle.config.ts'
Reading config file '/home/itsmishra/ayanami/drizzle.config.ts'
Using 'pg' driver for database querying
[⢿] Pulling schema from database...
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at /home/itsmishra/ayanami/node_modules/drizzle-kit/bin.cjs:20632:66
at Array.map (<anonymous>)
at defaultForColumn (/home/itsmishra/ayanami/node_modules/drizzle-kit/bin.cjs:20622:74)
at /home/itsmishra/ayanami/node_modules/drizzle-kit/bin.cjs:20219:36
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[itsmishra@Rajat ayanami]$
import 'dotenv/config';
import { defineConfig } from 'drizzle-kit';

export default defineConfig({
out: './drizzle',
schema: ['./src/schema/Guild.ts'],
dialect: 'postgresql',
dbCredentials: {
url: process.env.DATABASE_URL!,
},
strict: true,
verbose: true
});
import 'dotenv/config';
import { defineConfig } from 'drizzle-kit';

export default defineConfig({
out: './drizzle',
schema: ['./src/schema/Guild.ts'],
dialect: 'postgresql',
dbCredentials: {
url: process.env.DATABASE_URL!,
},
strict: true,
verbose: true
});
2 replies