laravel-commando icon indicating copy to clipboard operation
laravel-commando copied to clipboard

More Database Drivers

Open undjike opened this issue 4 years ago • 3 comments

@vkovic correct me if I'm wrong... Only the MySQL Database driver is available. I want to create a database in SQL Server. Is it available already? If not, are planning to add it soon?

undjike avatar Dec 23 '20 11:12 undjike

@undjike Hey there - yep you're right, only MySql for the time being.

On the other hand, everything is ready for other handlers to be implemented, there where just not enough time. Take a look into src/Handlers/Database/MySqlHandler.php to see how MySql handler is implemented - it's simple and straight forward.

If you need some help i'll be glad to support, but I don't have enough time for implementation on my own.

vkovic avatar Dec 23 '20 11:12 vkovic

Okay, I'll make a pull request as soon as possible.

undjike avatar Dec 23 '20 11:12 undjike

Ok, as a jump start, you need to create SqlServerHandler class which will extend AbstractDbHandler class. You're new class needs to implement following methods:

abstract public function databaseExists($database);
abstract public function createDatabase($database);
abstract public function dropDatabase($database);
abstract public function getColumns($database, $table);

... and it's should be easy from there ...

vkovic avatar Dec 23 '20 11:12 vkovic