Files
kokken/scripts/add-sides-column.mjs
Alex Polo 570c41f465 Add comprehensive Playwright tests for calendar functionality
- Implemented tests for debugging browser cache vs server response.
- Verified calendar displays correct dates for November 2025.
- Added visual inspection screenshot for calendar layout.
- Created tests to ensure calendar fits within its container.
- Checked for correct styling of available and blocked dates.
- Debugged login form behavior and cookie handling.
- Added tests for forced browser refresh and cache verification.
- Conducted visual tests to compare actual calendar layout with expected.
- Enhanced logging for better traceability during test execution.
2025-11-07 14:09:22 +01:00

29 lines
662 B
JavaScript

import mysql from 'mysql2/promise';
import dotenv from 'dotenv';
dotenv.config();
const connection = await mysql.createConnection({
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.DB_NAME
});
console.log('=== Adding sides column to menus ===\n');
try {
await connection.execute(`
ALTER TABLE menus ADD COLUMN sides JSON AFTER courses
`);
console.log('✓ sides column added to menus table');
} catch (error) {
if (error.code === 'ER_DUP_FIELDNAME') {
console.log('✓ sides column already exists');
} else {
throw error;
}
} finally {
await connection.end();
}