diff --git a/Makefile b/Makefile index 6dcdc839..b58cae0d 100644 --- a/Makefile +++ b/Makefile @@ -5,13 +5,17 @@ CURR_PATH=$(shell pwd) -help: +all: build -all: + +build: composer install install: +schema: + php artisan infyom:scaffold airlines --fieldsFile=database/schema/airlines.json + docker: @mkdir -p $(CURR_PATH)/tmp/mysql diff --git a/config/app.php b/config/app.php index e8dd9dbc..1d4ab49e 100755 --- a/config/app.php +++ b/config/app.php @@ -12,7 +12,7 @@ return [ | any other location as required by the application or its packages. */ - 'name' => 'My Application', + 'name' => 'phpVMS', /* |-------------------------------------------------------------------------- @@ -38,7 +38,7 @@ return [ | */ - 'debug' => env('APP_DEBUG', false), + 'debug' => env('APP_DEBUG', true), /* |-------------------------------------------------------------------------- diff --git a/config/database.php b/config/database.php index fd22e8e9..9f3ad77a 100755 --- a/config/database.php +++ b/config/database.php @@ -56,9 +56,9 @@ return [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '3306'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), + 'database' => env('DB_DATABASE', 'phpvms'), + 'username' => env('DB_USERNAME', 'phpvms'), + 'password' => env('DB_PASSWORD', 'phpvms'), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', @@ -66,19 +66,6 @@ return [ 'engine' => null, ], - 'pgsql' => [ - 'driver' => 'pgsql', - 'host' => env('DB_HOST', 'localhost'), - 'port' => env('DB_PORT', '5432'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', - 'prefix' => '', - 'schema' => 'public', - 'sslmode' => 'prefer', - ], - ], /* diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/0000_create_users_table.php similarity index 57% rename from database/migrations/2014_10_12_000000_create_users_table.php rename to database/migrations/0000_create_users_table.php index 55574ee4..62573a83 100755 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/0000_create_users_table.php @@ -15,9 +15,21 @@ class CreateUsersTable extends Migration { Schema::create('users', function (Blueprint $table) { $table->increments('id'); - $table->string('name'); + $table->string('first_name'); + $table->string('last_name'); $table->string('email')->unique(); $table->string('password'); + $table->string('code'); + $table->string('location'); + $table->string('hub'); + $table->unsignedBigInteger('flights'); + $table->float('hours'); + $table->float('pay'); + $table->boolean('confirmed'); + $table->boolean('retired'); + $table->dateTime('last_pirep'); + $table->dateTime('created_at'); + $table->dateTime('updated_at'); $table->rememberToken(); $table->timestamps(); }); diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/0001_create_password_resets_table.php similarity index 100% rename from database/migrations/2014_10_12_100000_create_password_resets_table.php rename to database/migrations/0001_create_password_resets_table.php diff --git a/database/schema/airlines.json b/database/schema/airlines.json new file mode 100644 index 00000000..9c968aa1 --- /dev/null +++ b/database/schema/airlines.json @@ -0,0 +1,42 @@ +[ + { + "name": "id", + "dbType": "increments", + "htmlType": "", + "validations": "", + "searchable": false, + "fillable": false, + "primary": true, + "inForm": false, + "inIndex": false + }, + { + "name": "code", + "dbType": "string", + "htmlType": "text", + "validations": "required", + "searchable": true + }, + { + "name": "created_at", + "dbType": "timestamp", + "htmlType": "", + "validations": "", + "searchable": false, + "fillable": false, + "primary": false, + "inForm": false, + "inIndex": false + }, + { + "name": "updated_at", + "dbType": "timestamp", + "htmlType": "", + "validations": "", + "searchable": false, + "fillable": false, + "primary": false, + "inForm": false, + "inIndex": false + } +]