Skip to content
This repository was archived by the owner on Dec 6, 2019. It is now read-only.

Commit c15dc84

Browse files
committed
Added support for SQLite databases
1 parent c0a440d commit c15dc84

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.env.example

+8
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,21 @@ APP_DEBUG=true
33
APP_KEY=SomeRandomString
44
APP_URL=http://localhost
55

6+
# MySQL
67
DB_CONNECTION=mysql
78
DB_HOST=127.0.0.1
89
DB_PORT=3306
910
DB_DATABASE=homestead
1011
DB_USERNAME=homestead
1112
DB_PASSWORD=secret
1213

14+
# SQLite - If you want to use this instead of mysql, comment the mysql part above out (add a '#' at the beginning)
15+
# and remove the comment identifier of the line below
16+
#DB_CONNECTION=sqlite
17+
# This is the database path for the file
18+
# If you keep this commented out, this will be the default path '/home/OS_USER/PROJECT_FOLDER/database/database.sqlite'
19+
#DB_DATABASE=Test.db
20+
1321
CACHE_DRIVER=file
1422
SESSION_DRIVER=file
1523
QUEUE_DRIVER=sync

database/database.sqlite

Whitespace-only changes.

database/migrations/2016_04_09_135314_create_servers_table.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ public function up() {
1515
$table->increments('id')->unsigned;
1616

1717
$table->string('address');
18-
$table->string('motd');
19-
$table->string('version');
20-
$table->boolean('online');
18+
$table->string('motd')->nullable();
19+
$table->string('version')->nullable();
20+
$table->boolean('online')->nullable();
2121
//if the onlinemode check failed
2222
$table->boolean('onlinemode')->nullable()->default(null);
2323

24-
$table->smallInteger('players')->unsigned;
25-
$table->smallInteger('maxplayers')->unsigned;
24+
$table->smallInteger('players')->nullable()->unsigned;
25+
$table->smallInteger('maxplayers')->nullable()->unsigned;
2626

27-
$table->smallInteger('ping')->unsigned;
27+
$table->smallInteger('ping')->nullable()->unsigned;
2828

2929
$table->unique("address");
3030

0 commit comments

Comments
 (0)