Jane Doe
-Online
+Select a Conversation
+Offline
+Login
+ + + + +Don't have an account? Sign Up
+Create Account
+ + + + +Already have an account? Log In
+diff --git a/db/migrate.php b/db/migrate.php new file mode 100644 index 0000000..06aba1c --- /dev/null +++ b/db/migrate.php @@ -0,0 +1,21 @@ +exec($sql); + echo "Migration '001_create_users_table.sql' applied successfully.\n"; + } else { + echo "Migration file not found.\n"; + } + } catch (PDOException $e) { + die("Migration failed: " . $e->getMessage() . "\n"); + } +} + +run_migrations(); + diff --git a/db/migrations/001_create_users_table.sql b/db/migrations/001_create_users_table.sql new file mode 100644 index 0000000..6f18a32 --- /dev/null +++ b/db/migrations/001_create_users_table.sql @@ -0,0 +1,6 @@ +CREATE TABLE IF NOT EXISTS users ( + id INT AUTO_INCREMENT PRIMARY KEY, + username VARCHAR(50) NOT NULL UNIQUE, + password_hash VARCHAR(255) NOT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); diff --git a/index.php b/index.php index 3b62c11..ea35e73 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,12 @@ +
@@ -45,37 +54,9 @@No conversations yet.
Online
+Offline
+Don't have an account? Sign Up
+Already have an account? Log In
+