Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #15

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DB_DSN = mysql:host=localhost;port=3307;dbname=fixmedb
DB_DSN = mysql:host=localhost;port=3306;dbname=fixmedb
DB_USER = root
DB_PASSWORD = ''
DB_PASSWORD =
3 changes: 0 additions & 3 deletions .env-example

This file was deleted.

2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DB_DSN = mysql:host=localhost;port=3307;dbname=fixmedb
DB_USER = root
DB_PASSWORD =
DB_PASSWORD = root
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
vendor
.idea
.env
/public/.env
composer.lock
32 changes: 0 additions & 32 deletions core/Application.php~

This file was deleted.

98 changes: 0 additions & 98 deletions core/Model.php~

This file was deleted.

17 changes: 0 additions & 17 deletions core/Response.php~

This file was deleted.

34 changes: 9 additions & 25 deletions migrations/m0001_initial.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,27 @@ class m0001_initial
public function up()
{
$db = \app\core\Application::$app->db;
$SQL1 = "CREATE TABLE `users` (
`tech_id` int NOT NULL AUTO_INCREMENT,
`fname` varchar(45) NOT NULL,
`lname` varchar(45) NOT NULL,
$SQL1 = "CREATE TABLE `technician` (
`tech_id` int(11) NOT NULL,
`firstName` varchar(45) DEFAULT NULL,
`lastName` varchar(45) DEFAULT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(255) NOT NULL,
`phone_no` varchar(15) NOT NULL,
`phoneNumber` varchar(15) DEFAULT NULL,
`address` varchar(200) NOT NULL,
`profile_picture` varchar(255) DEFAULT NULL,
`reg_date` date DEFAULT NULL,
`reg_date` datetime DEFAULT current_timestamp(),
`longitude` decimal(10,8) DEFAULT NULL,
`latitude` decimal(11,8) DEFAULT NULL,
PRIMARY KEY (`tech_id`),
UNIQUE KEY `tech_id_UNIQUE` (`tech_id`)
`status` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;";
$db->pdo->exec($SQL1);
$SQL2 = "CREATE TABLE IF NOT EXISTS `technician` (
`tech_id` int NOT NULL AUTO_INCREMENT,
`fname` varchar(45) NOT NULL,
`lname` varchar(45) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(255) NOT NULL,
`phone_no` varchar(15) NOT NULL,
`address` varchar(200) NOT NULL,
`profile_picture` varchar(255) DEFAULT NULL,
`reg_date` date DEFAULT NULL,
`longitude` decimal(10,8) DEFAULT NULL,
`latitude` decimal(11,8) DEFAULT NULL,
PRIMARY KEY (`tech_id`),
UNIQUE KEY `tech_id_UNIQUE` (`tech_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;";
$db->pdo->exec($SQL2);

}
public function down()
{
$db = \app\core\Application::$app->db;
$SQL1 = "DROP TABLE users;";
$SQL1 = "DROP TABLE technician;";
$db->pdo->exec($SQL1);
}
}
61 changes: 0 additions & 61 deletions models/Technician.php~

This file was deleted.

Loading