I have a database connection properly set up but, when i run vania migrate command the table users is not created. Moreover when i run vania make:migration create_posts_table this command runs but the migraation is not created. When i repeat the same command i get a warning that it exists.
The code below is the database client , apparently the postgresql case is not handled and the pgsql case doesent work either
import 'package:vania/vania.dart';
class DatabaseClient {
DatabaseClient._internal();
static final DatabaseClient _instance = DatabaseClient._internal();
factory DatabaseClient() => _instance;
DatabaseDriver? database;
Future<void> setup() async {
switch (env('DB_CONNECTION')) {
case 'mysql':
database = await MysqlDriver().init();
database?.connection.reconnectIfMissingConnection();
break;
case 'postgresql':
case 'pgsql':
database = await PostgreSQLDriver().init();
database?.connection.reconnectIfMissingConnection();
break;
default:
break;
}
}
}
I have a database connection properly set up but, when i run vania migrate command the table users is not created. Moreover when i run vania make:migration create_posts_table this command runs but the migraation is not created. When i repeat the same command i get a warning that it exists. The code below is the database client , apparently the postgresql case is not handled and the pgsql case doesent work either