This website works better with JavaScript.
Home
Explore
Register
Sign In
miteruzo
/
goatoh_training_server
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
added migration file and db connection
main
Miteruzo
1 year ago
parent
8f615db95a
commit
170e5d6de8
2 changed files
with
11 additions
and
0 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-0
db_connection.php
+10
-0
migrate.php
+ 1
- 0
db_connection.php
View File
@@ -9,6 +9,7 @@ $db_pass = $config['pass'];
$__db_connection = new mysqli ($db_host, $db_user, $db_pass, 'goatoh_training',
$__db_connection = new mysqli ($db_host, $db_user, $db_pass, 'goatoh_training',
$db_port);
$db_port);
$__db_connection -> set_charset ('utf8');
unset ($config);
unset ($config);
unset ($db_host);
unset ($db_host);
+ 10
- 0
migrate.php
View File
@@ -0,0 +1,10 @@
<?php
require_once './db_connection.php';
$files = glob ('./migrations/*.sql');
foreach ($files as $file)
$__db_connection -> query (file_get_contents ($file));
Write
Preview
Loading…
Cancel
Save