-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from howyi/add-maria-db
add Support MariaDB
- Loading branch information
Showing
10 changed files
with
165 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Howyi\Conv\Driver; | ||
|
||
use Howyi\Conv\Structure\ColumnStructure\MariaDB102ColumnStructure; | ||
|
||
class MariaDB102Driver extends MySQL57Driver | ||
{ | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function generateColumnStructure(...$values) | ||
{ | ||
return new MariaDB102ColumnStructure(...$values); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/Structure/ColumnStructure/MariaDB102ColumnStructure.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Howyi\Conv\Structure\ColumnStructure; | ||
|
||
use Howyi\Conv\Structure\Attribute; | ||
use Howyi\Conv\Util\SchemaKey; | ||
|
||
class MariaDB102ColumnStructure extends MySQL57ColumnStructure implements MySQLColumnStructureInterface | ||
{ | ||
/** | ||
* @return string | ||
*/ | ||
public function getDefault(): string | ||
{ | ||
return $this->default; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CREATE TABLE `score` ( | ||
`user_id` int(11) NOT NULL COMMENT 'User id', | ||
`score` int(11) NOT NULL COMMENT 'score', | ||
`created_date` datetime DEFAULT NULL COMMENT '作成日時', | ||
PRIMARY KEY (`user_id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='Score table'; |