diff --git a/database/migrations/2025_01_18_114009_create_cache_table.php b/database/migrations/2025_01_18_114009_create_cache_table.php new file mode 100644 index 00000000..7497062f --- /dev/null +++ b/database/migrations/2025_01_18_114009_create_cache_table.php @@ -0,0 +1,46 @@ +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. + */ + public function down(): void + { + Schema::dropIfExists('cache'); + Schema::dropIfExists('cache_locks'); + } +}; diff --git a/database/migrations/2025_01_18_114012_create_sessions_table.php b/database/migrations/2025_01_18_114012_create_sessions_table.php new file mode 100644 index 00000000..8f9971bf --- /dev/null +++ b/database/migrations/2025_01_18_114012_create_sessions_table.php @@ -0,0 +1,41 @@ +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. + */ + public function down(): void + { + Schema::dropIfExists('sessions'); + } +};