SQLite for local dev (#6322)

* update values for a sqlite default world

* migrate on post create project

* touch database

* fix typo
This commit is contained in:
Taylor Otwell 2024-01-20 16:02:54 -06:00 committed by GitHub
parent b1502f3c07
commit e23c0c1bfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 25 additions and 9 deletions

View File

@ -9,7 +9,7 @@ APP_LOCALE=en
APP_FALLBACK_LOCALE=en APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file APP_MAINTENANCE_DRIVER=cache
APP_MAINTENANCE_STORE=database APP_MAINTENANCE_STORE=database
LOG_CHANNEL=stack LOG_CHANNEL=stack
@ -17,18 +17,18 @@ LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug LOG_LEVEL=debug
DB_CONNECTION=mysql DB_CONNECTION=sqlite
DB_HOST=127.0.0.1 # DB_HOST=127.0.0.1
DB_PORT=3306 # DB_PORT=3306
DB_DATABASE=laravel # DB_DATABASE=laravel
DB_USERNAME=root # DB_USERNAME=root
DB_PASSWORD= # DB_PASSWORD=
BROADCAST_CONNECTION=log BROADCAST_CONNECTION=log
CACHE_STORE=database CACHE_STORE=database
FILESYSTEM_DISK=local FILESYSTEM_DISK=local
QUEUE_CONNECTION=database QUEUE_CONNECTION=database
SESSION_DRIVER=cookie SESSION_DRIVER=database
SESSION_LIFETIME=120 SESSION_LIFETIME=120
MEMCACHED_HOST=127.0.0.1 MEMCACHED_HOST=127.0.0.1

View File

@ -43,7 +43,9 @@
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
], ],
"post-create-project-cmd": [ "post-create-project-cmd": [
"@php artisan key:generate --ansi" "@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --ansi"
] ]
}, },
"extra": { "extra": {

View File

@ -21,6 +21,19 @@ return new class extends Migration
$table->unsignedInteger('created_at'); $table->unsignedInteger('created_at');
}); });
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('name');
$table->integer('total_jobs');
$table->integer('pending_jobs');
$table->integer('failed_jobs');
$table->longText('failed_job_ids');
$table->mediumText('options')->nullable();
$table->integer('cancelled_at')->nullable();
$table->integer('created_at');
$table->integer('finished_at')->nullable();
});
Schema::create('failed_jobs', function (Blueprint $table) { Schema::create('failed_jobs', function (Blueprint $table) {
$table->id(); $table->id();
$table->string('uuid')->unique(); $table->string('uuid')->unique();
@ -38,6 +51,7 @@ return new class extends Migration
public function down(): void public function down(): void
{ {
Schema::dropIfExists('jobs'); Schema::dropIfExists('jobs');
Schema::dropIfExists('job_batches');
Schema::dropIfExists('failed_jobs'); Schema::dropIfExists('failed_jobs');
} }
}; };