From 9fd67759d6b7e163fb508b53b239ae0a7a407a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Program=C3=A1tor?= Date: Tue, 4 Aug 2020 09:15:11 +0200 Subject: [PATCH] Read me cleanup.. (and one empty line removed) --- README.md | 19 ++++++++++++------- src/Column.php | 1 - 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 24723cb..7f23c71 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,8 @@ services: Then you update your factories: You need to provide connection in your factory this way. -Or, you can create Updater factory and provide database connection there. +Or, you can create Updater factory and provide database connection +there. ```php class ArticleRepositoryFactory @@ -109,12 +110,11 @@ class ArticleRepository ###### Code: -If you think that class `\Zrny\MkSQL\Column` is missing `->setPrimary()` method to create primary keys, -then notice that every table created with MkSQL have primary key `id` -that is `int` & `AUTO INCREMENT` by default and this behavior cannot -be changed, trying to define column `id` will result in error. - -Example with accounts ant their corresponding auth tokens: +Keep in mind that every table automatically gets `PRIMARY` column `id` +as `int` and `AUTO INCREMENT`, trying to define column `id` will +result in error. + +This package does not support **Composite Primary Key**s ```php $updater->table("accounts") @@ -150,6 +150,11 @@ Example with accounts ant their corresponding auth tokens: ->endTable(); $updater->install(); + + /* + * or '->endTable()->install();' + */ + ``` This code will result in this: diff --git a/src/Column.php b/src/Column.php index 9169901..7dc546d 100644 --- a/src/Column.php +++ b/src/Column.php @@ -220,7 +220,6 @@ public function getComment(): ?string //endregion - public function install(\Nette\Database\Connection $db, int $driverType, array $full_desc, array $full_indexes, array $full_keys) : array { $Commands = [];