Skip to content

Commit 48ff3ad

Browse files
authored
Merge pull request #15 from kasunmendis7/develop
deleted some additional files that were unnecessary
2 parents faadc69 + 2c1c3b6 commit 48ff3ad

11 files changed

+13
-431
lines changed

.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
DB_DSN = mysql:host=localhost;port=3307;dbname=fixmedb
1+
DB_DSN = mysql:host=localhost;port=3306;dbname=fixmedb
22
DB_USER = root
3-
DB_PASSWORD = ''
3+
DB_PASSWORD =

.env-example

-3
This file was deleted.

.env.example

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
DB_DSN = mysql:host=localhost;port=3307;dbname=fixmedb
22
DB_USER = root
3-
DB_PASSWORD =
3+
DB_PASSWORD = root

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
vendor
22
.idea
33
.env
4+
/public/.env
45
composer.lock

core/Application.php~

-32
This file was deleted.

core/Model.php~

-98
This file was deleted.

core/Response.php~

-17
This file was deleted.

migrations/m0001_initial.php

+9-25
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,27 @@ class m0001_initial
44
public function up()
55
{
66
$db = \app\core\Application::$app->db;
7-
$SQL1 = "CREATE TABLE `users` (
8-
`tech_id` int NOT NULL AUTO_INCREMENT,
9-
`fname` varchar(45) NOT NULL,
10-
`lname` varchar(45) NOT NULL,
7+
$SQL1 = "CREATE TABLE `technician` (
8+
`tech_id` int(11) NOT NULL,
9+
`firstName` varchar(45) DEFAULT NULL,
10+
`lastName` varchar(45) DEFAULT NULL,
1111
`email` varchar(100) NOT NULL,
1212
`password` varchar(255) NOT NULL,
13-
`phone_no` varchar(15) NOT NULL,
13+
`phoneNumber` varchar(15) DEFAULT NULL,
1414
`address` varchar(200) NOT NULL,
1515
`profile_picture` varchar(255) DEFAULT NULL,
16-
`reg_date` date DEFAULT NULL,
16+
`reg_date` datetime DEFAULT current_timestamp(),
1717
`longitude` decimal(10,8) DEFAULT NULL,
1818
`latitude` decimal(11,8) DEFAULT NULL,
19-
PRIMARY KEY (`tech_id`),
20-
UNIQUE KEY `tech_id_UNIQUE` (`tech_id`)
19+
`status` int(11) DEFAULT NULL
2120
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;";
2221
$db->pdo->exec($SQL1);
23-
$SQL2 = "CREATE TABLE IF NOT EXISTS `technician` (
24-
`tech_id` int NOT NULL AUTO_INCREMENT,
25-
`fname` varchar(45) NOT NULL,
26-
`lname` varchar(45) NOT NULL,
27-
`email` varchar(100) NOT NULL,
28-
`password` varchar(255) NOT NULL,
29-
`phone_no` varchar(15) NOT NULL,
30-
`address` varchar(200) NOT NULL,
31-
`profile_picture` varchar(255) DEFAULT NULL,
32-
`reg_date` date DEFAULT NULL,
33-
`longitude` decimal(10,8) DEFAULT NULL,
34-
`latitude` decimal(11,8) DEFAULT NULL,
35-
PRIMARY KEY (`tech_id`),
36-
UNIQUE KEY `tech_id_UNIQUE` (`tech_id`)
37-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;";
38-
$db->pdo->exec($SQL2);
22+
3923
}
4024
public function down()
4125
{
4226
$db = \app\core\Application::$app->db;
43-
$SQL1 = "DROP TABLE users;";
27+
$SQL1 = "DROP TABLE technician;";
4428
$db->pdo->exec($SQL1);
4529
}
4630
}

models/Technician.php~

-61
This file was deleted.

0 commit comments

Comments
 (0)