Skip to content

Commit ae7d8a4

Browse files
committed
refactor: ignore setting Autoincrement on users table on sqlite
1 parent e395fe1 commit ae7d8a4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

database/migrations/2014_10_12_000000_create_users_table.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ public function up(): void
2323
$table->timestamps();
2424
});
2525

26-
$index = rand(2344, 8988);
27-
DB::statement("ALTER TABLE users AUTO_INCREMENT = $index");
26+
if(env('DB_CONNECTION') != 'sqlite') {
27+
$index = rand(2344, 8988);
28+
DB::statement("ALTER TABLE users AUTO_INCREMENT = $index");
29+
}
2830
}
2931

3032
/**

0 commit comments

Comments
 (0)