import pool from './db.js';
async function createTable() {
    try {
        await pool.query(`
            CREATE TABLE IF NOT EXISTS users (
                id VARCHAR(36) PRIMARY KEY,
                username VARCHAR(100) UNIQUE NOT NULL,
                password_hash VARCHAR(255) NOT NULL,
                role VARCHAR(50) DEFAULT 'admin',
                created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
            );
        `);
        console.log('Users table created successfully');
        process.exit(0);
    }
    catch (error) {
        console.error('Error creating table:', error);
        process.exit(1);
    }
}
createTable();
//# sourceMappingURL=create_users_table.js.map