You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: database/migrations/2024_11_20_200801_create_cache_invalidation_timestamps_table.php
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,15 @@
11
11
*/
12
12
publicfunctionup(): void
13
13
{
14
+
if (Schema::hasTable('cache_invalidation_timestamps')) {
15
+
return;
16
+
}
14
17
Schema::create('cache_invalidation_timestamps', function (Blueprint$table) {
15
18
$table->enum('identifier_type', ['key', 'tag'])->comment('Indicates whether the identifier is a cache key or tag');
16
19
$table->string('identifier')->comment('The cache key or tag');
17
20
$table->dateTime('last_invalidated')->comment('Timestamp of the last invalidation');
18
-
19
21
// Partition key as a generated stored column
20
22
$table->integer('partition_key')->storedAs('YEAR(`last_invalidated`) * 100 + WEEK(`last_invalidated`, 3)')->comment('Partition key based on last_invalidated');
0 commit comments