26 lines
710 B
PHP
26 lines
710 B
PHP
<?php
|
|
|
|
require_once __DIR__ . '/../../db/config.php';
|
|
|
|
try {
|
|
$db = db();
|
|
// Create meetings table
|
|
$db->exec("
|
|
CREATE TABLE IF NOT EXISTS meetings (
|
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
|
group_id INT NOT NULL,
|
|
meeting_date DATE NOT NULL,
|
|
title VARCHAR(255),
|
|
created_by INT,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
is_active TINYINT(1) DEFAULT 0,
|
|
FOREIGN KEY (group_id) REFERENCES bni_groups(id) ON DELETE CASCADE
|
|
)
|
|
");
|
|
echo "Migration 030 run successfully: meetings table created.
|
|
";
|
|
} catch (PDOException $e) {
|
|
die("Migration 030 failed: " . $e->getMessage() . "
|
|
");
|
|
}
|