Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Commit 623545e

Browse files
author
root
committed
Adding dbseed
1 parent 0cdd23f commit 623545e

12 files changed

+78
-0
lines changed

Controllers/.htaccess

100644100755
File mode changed.

Controllers/AccountController.php

100644100755
File mode changed.

Controllers/BaseController.php

100644100755
File mode changed.

Controllers/UsersController.php

100644100755
File mode changed.

DbSeed.sql

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
2+
SET time_zone = "+00:00";
3+
4+
CREATE DATABASE IF NOT EXISTS `uptotek`
5+
6+
7+
CREATE TABLE IF NOT EXISTS `uptotek_users` (
8+
`id` int(11) NOT NULL,
9+
`email` varchar(256) COLLATE utf8_danish_ci NOT NULL,
10+
`password` varchar(32) COLLATE utf8_danish_ci NOT NULL,
11+
`firstname` varchar(256) COLLATE utf8_danish_ci NOT NULL,
12+
`lastname` varchar(256) COLLATE utf8_danish_ci NOT NULL,
13+
`picture` varchar(256) COLLATE utf8_danish_ci NOT NULL,
14+
`age` int(11) NOT NULL,
15+
`isgod` int(11) NOT NULL
16+
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_danish_ci;
17+
18+
INSERT INTO `uptotek_users` (`id`, `email`, `password`, `firstname`, `lastname`, `picture`, `age`, `isgod`) VALUES
19+
(1, '[email protected]', 'e48e13207341b6bffb7fb1622282247b', 'Rick', 'Astley', 'http://img1.wikia.nocookie.net/__cb20130318151721/epicrapbattlesofhistory/images/6/6d/Rick-astley.jpg', 49, 1),
20+
(2, '[email protected]', 'e48e13207341b6bffb7fb1622282247b', 'Oliver', 'Stenkilde', 'https://s3-us-west-2.amazonaws.com/slack-files2/avatars/2015-06-05/6013437043_86e286a75b0ac39ce6b2_192.jpg', 3, 0);
21+
22+
ALTER TABLE `uptotek_users`
23+
ADD PRIMARY KEY (`id`);
24+
25+
ALTER TABLE `uptotek_users`
26+
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
27+
28+
29+
30+
31+
CREATE TABLE IF NOT EXISTS `uptotek_skills` (
32+
`id` int(11) NOT NULL,
33+
`userid` int(11) NOT NULL,
34+
`skill` varchar(256) COLLATE utf8_danish_ci NOT NULL
35+
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_danish_ci;
36+
37+
INSERT INTO `uptotek_skills` (`id`, `userid`, `skill`) VALUES
38+
(1, 1, 'programming'),
39+
(2, 1, 'shitting'),
40+
(3, 1, 'eating'),
41+
(4, 1, 'cooking bacon'),
42+
(5, 1, 'being pro'),
43+
(6, 1, 'playing guitar'),
44+
(7, 1, 'picking up chicks'),
45+
(8, 2, 'programming'),
46+
(9, 2, 'shitting'),
47+
(10, 2, 'eating'),
48+
(11, 2, 'cooking bacon'),
49+
(12, 2, 'being pro'),
50+
(13, 2, 'playing guitar'),
51+
(14, 2, 'picking up chicks');
52+
53+
ALTER TABLE `uptotek_skills`
54+
ADD PRIMARY KEY (`id`);
55+
56+
ALTER TABLE `uptotek_skills`
57+
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=15;
58+
59+
60+
61+
62+
CREATE TABLE IF NOT EXISTS `uptotek_accesstokens` (
63+
`id` int(11) NOT NULL,
64+
`token` varchar(1024) COLLATE utf8_danish_ci NOT NULL,
65+
`userid` int(11) NOT NULL,
66+
`expires` int(11) NOT NULL
67+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_danish_ci;
68+
69+
ALTER TABLE `uptotek_accesstokens`
70+
ADD PRIMARY KEY (`id`);
71+
72+
ALTER TABLE `uptotek_accesstokens`
73+
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

Includes/.htaccess

100644100755
File mode changed.

Includes/Controllers.php

100644100755
File mode changed.

Includes/HeaderConstants.php

100644100755
File mode changed.

Includes/MysqlConstants.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
define("MYSQL_HOST","localhost");
3+
define("MYSQL_NAME", "root");
4+
define("MYSQL_PASS", "05P692173c55S87O6z");
5+
define("MYSQL_DB", "uptotek");

Includes/Route.php

100644100755
File mode changed.

README.md

100644100755
File mode changed.

index.php

100644100755
File mode changed.

0 commit comments

Comments
 (0)