@sureshdsk/devflow-mcp 3.1.2 → 3.1.3
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/drizzle/0001_mixed_genesis.sql +1 -4
- package/package.json +1 -1
- package/scripts/init-db.js +12 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
CREATE TABLE `projects` (
|
|
1
|
+
CREATE TABLE IF NOT EXISTS `projects` (
|
|
2
2
|
`id` text PRIMARY KEY NOT NULL,
|
|
3
3
|
`name` text NOT NULL,
|
|
4
4
|
`description` text,
|
|
@@ -6,6 +6,3 @@ CREATE TABLE `projects` (
|
|
|
6
6
|
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
|
|
7
7
|
`updated_at` integer DEFAULT (unixepoch()) NOT NULL
|
|
8
8
|
);
|
|
9
|
-
--> statement-breakpoint
|
|
10
|
-
ALTER TABLE `tasks` ADD `project_id` text REFERENCES projects(id);--> statement-breakpoint
|
|
11
|
-
ALTER TABLE `tasks` ADD `spec_name` text;
|
package/package.json
CHANGED
package/scripts/init-db.js
CHANGED
|
@@ -126,6 +126,17 @@ async function runMigrationsAndSeed(client, db) {
|
|
|
126
126
|
}
|
|
127
127
|
console.log('✓ Migrations complete');
|
|
128
128
|
|
|
129
|
+
// Verify tables actually exist before querying
|
|
130
|
+
const tableCheck = await client.execute(
|
|
131
|
+
`SELECT name FROM sqlite_master WHERE type='table' AND name='projects'`,
|
|
132
|
+
);
|
|
133
|
+
if (tableCheck.rows.length === 0) {
|
|
134
|
+
throw new Error(
|
|
135
|
+
'Migration completed but tables were not created.\n' +
|
|
136
|
+
'Try deleting ~/.devflow/devflow.db and re-running: devflow init',
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
129
140
|
// Create default project if none exists
|
|
130
141
|
const existingProjects = await client.execute('SELECT id FROM projects LIMIT 1');
|
|
131
142
|
if (existingProjects.rows.length === 0) {
|
|
@@ -207,7 +218,7 @@ if (require.main === module) {
|
|
|
207
218
|
console.error('\nTroubleshooting:');
|
|
208
219
|
console.error(' 1. Try reinstalling: npm install -g @sureshdsk/devflow-mcp');
|
|
209
220
|
console.error(' 2. Ensure ~/.devflow directory is writable');
|
|
210
|
-
console.error(' 3. Report issues at: https://github.com/
|
|
221
|
+
console.error(' 3. Report issues at: https://github.com/sureshdsk/devflow-mcp/issues');
|
|
211
222
|
process.exit(1);
|
|
212
223
|
});
|
|
213
224
|
}
|