diff --git a/db/migrations/001_create_users_table.sql b/db/migrations/001_create_users_table.sql new file mode 100644 index 0000000..3be0b28 --- /dev/null +++ b/db/migrations/001_create_users_table.sql @@ -0,0 +1,10 @@ +CREATE TABLE IF NOT EXISTS users ( + id INT AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(255) NOT NULL, + email VARCHAR(255) NOT NULL UNIQUE, + affiliation VARCHAR(255), + expertise TEXT, + orcid VARCHAR(255), + password VARCHAR(255) NOT NULL, -- For simplicity, will store as plaintext for now + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); diff --git a/setup.php b/setup.php new file mode 100644 index 0000000..3d85819 --- /dev/null +++ b/setup.php @@ -0,0 +1,11 @@ +exec($sql); + echo "Database setup successful."; +} catch (PDOException $e) { + die("Database setup failed: " . $e->getMessage()); +}