Improved migrations
This commit is contained in:
@@ -6,9 +6,16 @@ namespace App\Database;
|
||||
|
||||
use Medoo\Medoo;
|
||||
|
||||
final class Migration
|
||||
final class Migrator
|
||||
{
|
||||
public static function run(Medoo $db): void
|
||||
{
|
||||
self::createPostTable($db);
|
||||
// self::createCommentsTable($db);
|
||||
// self::createUsersTable($db);
|
||||
}
|
||||
|
||||
private static function createPostTable(Medoo $db): void
|
||||
{
|
||||
$db->pdo->exec("
|
||||
CREATE TABLE IF NOT EXISTS post (
|
||||
Reference in New Issue
Block a user