mirror of
https://github.com/flarum/core.git
synced 2025-08-16 21:34:08 +02:00
feat: add support for SQLite
(#3984)
* feat: add support for sqlite * chore: add warning on install * fix: ignore constraints before transaction begins * chore: update workflow * Apply fixes from StyleCI * chore: generate sqlite dump and manually add foreign keys * chore: fix actions * chore: fix actions * chore: fix actions * chore: fix actions * chore: fix actions * chore: fix actions * test: fix * Apply fixes from StyleCI * fix: sqlite with db prefix * Apply fixes from StyleCI * fix: statistics sqlite
This commit is contained in:
@@ -16,10 +16,9 @@ return [
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
|
||||
// do this manually because dbal doesn't recognize timestamp columns
|
||||
$connection = $schema->getConnection();
|
||||
$prefix = $connection->getTablePrefix();
|
||||
$connection->statement("ALTER TABLE `{$prefix}post_mentions_post` MODIFY created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP");
|
||||
$schema->table('post_mentions_post', function (Blueprint $table) {
|
||||
$table->timestamp('created_at')->nullable()->useCurrent()->change();
|
||||
});
|
||||
},
|
||||
|
||||
'down' => function (Builder $schema) {
|
||||
|
@@ -16,10 +16,9 @@ return [
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
|
||||
// do this manually because dbal doesn't recognize timestamp columns
|
||||
$connection = $schema->getConnection();
|
||||
$prefix = $connection->getTablePrefix();
|
||||
$connection->statement("ALTER TABLE `{$prefix}post_mentions_user` MODIFY created_at TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP");
|
||||
$schema->table('post_mentions_user', function (Blueprint $table) {
|
||||
$table->timestamp('created_at')->nullable()->useCurrent()->change();
|
||||
});
|
||||
},
|
||||
|
||||
'down' => function (Builder $schema) {
|
||||
|
Reference in New Issue
Block a user