some more scaffolding
This commit is contained in:
8
Makefile
8
Makefile
@@ -5,13 +5,17 @@
|
|||||||
|
|
||||||
CURR_PATH=$(shell pwd)
|
CURR_PATH=$(shell pwd)
|
||||||
|
|
||||||
help:
|
all: build
|
||||||
|
|
||||||
all:
|
|
||||||
|
build:
|
||||||
composer install
|
composer install
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
|
||||||
|
schema:
|
||||||
|
php artisan infyom:scaffold airlines --fieldsFile=database/schema/airlines.json
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
@mkdir -p $(CURR_PATH)/tmp/mysql
|
@mkdir -p $(CURR_PATH)/tmp/mysql
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ return [
|
|||||||
| any other location as required by the application or its packages.
|
| 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),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -56,9 +56,9 @@ return [
|
|||||||
'driver' => 'mysql',
|
'driver' => 'mysql',
|
||||||
'host' => env('DB_HOST', 'localhost'),
|
'host' => env('DB_HOST', 'localhost'),
|
||||||
'port' => env('DB_PORT', '3306'),
|
'port' => env('DB_PORT', '3306'),
|
||||||
'database' => env('DB_DATABASE', 'forge'),
|
'database' => env('DB_DATABASE', 'phpvms'),
|
||||||
'username' => env('DB_USERNAME', 'forge'),
|
'username' => env('DB_USERNAME', 'phpvms'),
|
||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', 'phpvms'),
|
||||||
'charset' => 'utf8',
|
'charset' => 'utf8',
|
||||||
'collation' => 'utf8_unicode_ci',
|
'collation' => 'utf8_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
@@ -66,19 +66,6 @@ return [
|
|||||||
'engine' => null,
|
'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',
|
|
||||||
],
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -15,9 +15,21 @@ class CreateUsersTable extends Migration
|
|||||||
{
|
{
|
||||||
Schema::create('users', function (Blueprint $table) {
|
Schema::create('users', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->string('name');
|
$table->string('first_name');
|
||||||
|
$table->string('last_name');
|
||||||
$table->string('email')->unique();
|
$table->string('email')->unique();
|
||||||
$table->string('password');
|
$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->rememberToken();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
42
database/schema/airlines.json
Normal file
42
database/schema/airlines.json
Normal file
@@ -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
|
||||||
|
}
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user