25 lines
696 B
PHP
25 lines
696 B
PHP
<?php
|
|
require_once __DIR__ . '/../config.php';
|
|
|
|
function migrate_003_create_applications_table() {
|
|
try {
|
|
$pdo = db();
|
|
$sql = "
|
|
CREATE TABLE IF NOT EXISTS `applications` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`job_id` int(11) NOT NULL,
|
|
`name` varchar(255) NOT NULL,
|
|
`email` varchar(255) NOT NULL,
|
|
`resume_path` varchar(255) NOT NULL,
|
|
`applied_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
";
|
|
$pdo->exec($sql);
|
|
echo "Migration 003: Applications table created successfully.\n";
|
|
} catch (PDOException $e) {
|
|
die("Migration 003 failed: " . $e->getMessage() . "\n");
|
|
}
|
|
}
|
|
|