diff --git a/.gitignore b/.gitignore index 5d3c1f8..4d5b28f 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,6 @@ Thumbs.db *.swp *.swo *~ + +# Claude +Claude.md \ No newline at end of file diff --git a/server.js b/server.js index 14d7f02..f247418 100644 --- a/server.js +++ b/server.js @@ -46,24 +46,7 @@ async function initDatabase() { ) `); - // Migrate existing users table to add missing columns and remove password column - try { - await connection.query(`ALTER TABLE users DROP COLUMN password`); - console.log('Removed password column (using SSO authentication)'); - } catch (e) { /* Column doesn't exist */ } - try { - await connection.query(`ALTER TABLE users ADD COLUMN display_name VARCHAR(255) AFTER username`); - } catch (e) { /* Column exists */ } - try { - await connection.query(`ALTER TABLE users ADD COLUMN email VARCHAR(255) AFTER display_name`); - } catch (e) { /* Column exists */ } - try { - await connection.query(`ALTER TABLE users ADD COLUMN groups TEXT AFTER email`); - } catch (e) { /* Column exists */ } - try { - await connection.query(`ALTER TABLE users ADD COLUMN last_login TIMESTAMP NULL AFTER groups`); - } catch (e) { /* Column exists */ } - console.log('Users table migration completed'); + // Database schema is managed manually - migrations removed after direct database fixes await connection.query(` CREATE TABLE IF NOT EXISTS workers ( @@ -106,21 +89,6 @@ async function initDatabase() { ) `); - // Migrate existing executions table to allow NULL workflow_id - try { - await connection.query(` - ALTER TABLE executions - MODIFY workflow_id VARCHAR(36) NULL, - DROP FOREIGN KEY executions_ibfk_1 - `); - console.log('Executions table migrated to allow NULL workflow_id'); - } catch (error) { - // Ignore error if foreign key doesn't exist or already modified - if (!error.message.includes('check that column/key exists')) { - console.log('Migration note:', error.message); - } - } - console.log('Database tables initialized successfully'); } catch (error) { console.error('Database initialization error:', error);