update database
This commit is contained in:
		
							parent
							
								
									eac9f2f550
								
							
						
					
					
						commit
						f6a5572a3c
					
				|  | @ -18,10 +18,10 @@ DB_CONNECTION=sqlite | ||||||
| # DB_PASSWORD= | # DB_PASSWORD= | ||||||
| 
 | 
 | ||||||
| BROADCAST_DRIVER=log | BROADCAST_DRIVER=log | ||||||
| CACHE_DRIVER=file | CACHE_DRIVER=database | ||||||
| FILESYSTEM_DISK=local | FILESYSTEM_DISK=local | ||||||
| QUEUE_CONNECTION=rabbitmq | QUEUE_CONNECTION=rabbitmq | ||||||
| SESSION_DRIVER=file | SESSION_DRIVER=database | ||||||
| SESSION_LIFETIME=120 | SESSION_LIFETIME=120 | ||||||
| 
 | 
 | ||||||
| MEMCACHED_HOST=127.0.0.1 | MEMCACHED_HOST=127.0.0.1 | ||||||
|  |  | ||||||
|  | @ -0,0 +1,35 @@ | ||||||
|  | <?php | ||||||
|  | 
 | ||||||
|  | use Illuminate\Database\Migrations\Migration; | ||||||
|  | use Illuminate\Database\Schema\Blueprint; | ||||||
|  | use Illuminate\Support\Facades\Schema; | ||||||
|  | 
 | ||||||
|  | return new class extends Migration | ||||||
|  | { | ||||||
|  |     /** | ||||||
|  |      * Run the migrations. | ||||||
|  |      * | ||||||
|  |      * @return void | ||||||
|  |      */ | ||||||
|  |     public function up() | ||||||
|  |     { | ||||||
|  |         Schema::create('sessions', function (Blueprint $table) { | ||||||
|  |             $table->string('id')->primary(); | ||||||
|  |             $table->foreignId('user_id')->nullable()->index(); | ||||||
|  |             $table->string('ip_address', 45)->nullable(); | ||||||
|  |             $table->text('user_agent')->nullable(); | ||||||
|  |             $table->longText('payload'); | ||||||
|  |             $table->integer('last_activity')->index(); | ||||||
|  |         }); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * Reverse the migrations. | ||||||
|  |      * | ||||||
|  |      * @return void | ||||||
|  |      */ | ||||||
|  |     public function down() | ||||||
|  |     { | ||||||
|  |         Schema::dropIfExists('sessions'); | ||||||
|  |     } | ||||||
|  | }; | ||||||
|  | @ -0,0 +1,39 @@ | ||||||
|  | <?php | ||||||
|  | 
 | ||||||
|  | use Illuminate\Database\Migrations\Migration; | ||||||
|  | use Illuminate\Database\Schema\Blueprint; | ||||||
|  | use Illuminate\Support\Facades\Schema; | ||||||
|  | 
 | ||||||
|  | return new class extends Migration | ||||||
|  | { | ||||||
|  |     /** | ||||||
|  |      * Run the migrations. | ||||||
|  |      * | ||||||
|  |      * @return void | ||||||
|  |      */ | ||||||
|  |     public function up() | ||||||
|  |     { | ||||||
|  |         Schema::create('cache', function (Blueprint $table) { | ||||||
|  |             $table->string('key')->primary(); | ||||||
|  |             $table->mediumText('value'); | ||||||
|  |             $table->integer('expiration'); | ||||||
|  |         }); | ||||||
|  | 
 | ||||||
|  |         Schema::create('cache_locks', function (Blueprint $table) { | ||||||
|  |             $table->string('key')->primary(); | ||||||
|  |             $table->string('owner'); | ||||||
|  |             $table->integer('expiration'); | ||||||
|  |         }); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * Reverse the migrations. | ||||||
|  |      * | ||||||
|  |      * @return void | ||||||
|  |      */ | ||||||
|  |     public function down() | ||||||
|  |     { | ||||||
|  |         Schema::dropIfExists('cache'); | ||||||
|  |         Schema::dropIfExists('cache_locks'); | ||||||
|  |     } | ||||||
|  | }; | ||||||
|  | @ -7,6 +7,13 @@ then | ||||||
|     composer install |     composer install | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
|  | # DATABASE | ||||||
|  | if [ ! -f "/app/database/database.sqlite" ] | ||||||
|  | then | ||||||
|  |     touch /app/database/database.sqlite | ||||||
|  |     php artisan migrate | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| # HORIZON | # HORIZON | ||||||
| sh /app/.horizon/horizon.sh | sh /app/.horizon/horizon.sh | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue