@@ -581,6 +581,18 @@ public function createTables(): void
581581 $ table ->char ('uid ' , 36 )->default ('0 ' );
582582 });
583583
584+ Schema::create ('routetokens ' , function (Blueprint $ table ) {
585+ $ table ->integer ('id ' , true );
586+ $ table ->char ('token ' , 32 );
587+ $ table ->text ('route ' )->nullable ();
588+ $ table ->unsignedTinyInteger ('usageLimit ' )->nullable ();
589+ $ table ->unsignedTinyInteger ('usageCount ' )->nullable ();
590+ $ table ->dateTime ('expiryDate ' );
591+ $ table ->dateTime ('dateCreated ' );
592+ $ table ->dateTime ('dateUpdated ' );
593+ $ table ->char ('uid ' , 36 )->default ('0 ' );
594+ });
595+
584596 Schema::create (Table::SEARCHINDEXQUEUE , function (Blueprint $ table ) {
585597 $ table ->integer ('id ' , true );
586598 $ table ->integer ('elementId ' );
@@ -739,18 +751,6 @@ public function createTables(): void
739751 $ table ->dateTime ('dateUpdated ' );
740752 });
741753
742- Schema::create ('tokens ' , function (Blueprint $ table ) {
743- $ table ->integer ('id ' , true );
744- $ table ->char ('token ' , 32 );
745- $ table ->text ('route ' )->nullable ();
746- $ table ->unsignedTinyInteger ('usageLimit ' )->nullable ();
747- $ table ->unsignedTinyInteger ('usageCount ' )->nullable ();
748- $ table ->dateTime ('expiryDate ' );
749- $ table ->dateTime ('dateCreated ' );
750- $ table ->dateTime ('dateUpdated ' );
751- $ table ->char ('uid ' , 36 )->default ('0 ' );
752- });
753-
754754 Schema::create (Table::USERGROUPS , function (Blueprint $ table ) {
755755 $ table ->integer ('id ' , true );
756756 $ table ->string ('name ' );
@@ -996,8 +996,8 @@ public function createIndexes(): void
996996 Schema::createIndex (Table::TAGGROUPS , ['handle ' ]);
997997 Schema::createIndex (Table::TAGGROUPS , ['dateDeleted ' ]);
998998 Schema::createIndex (Table::TAGS , ['groupId ' ]);
999- Schema::createIndex (Table::TOKENS , ['token ' ], unique: true );
1000- Schema::createIndex (Table::TOKENS , ['expiryDate ' ]);
999+ Schema::createIndex (Table::ROUTETOKENS , ['token ' ], unique: true );
1000+ Schema::createIndex (Table::ROUTETOKENS , ['expiryDate ' ]);
10011001 Schema::createIndex (Table::USERGROUPS , ['handle ' ]);
10021002 Schema::createIndex (Table::USERGROUPS , ['name ' ]);
10031003 Schema::createIndex (Table::USERGROUPS_USERS , ['groupId ' , 'userId ' ], unique: true );
0 commit comments