Skip to content

Commit

Permalink
Read me cleanup.. (and one empty line removed)
Browse files Browse the repository at this point in the history
  • Loading branch information
Programátor authored and Programátor committed Aug 4, 2020
1 parent 00842a5 commit 9fd6775
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -150,6 +150,11 @@ Example with accounts ant their corresponding auth tokens:
->endTable();

$updater->install();

/*
* or '->endTable()->install();'
*/

```

This code will result in this:
Expand Down
1 change: 0 additions & 1 deletion src/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down

0 comments on commit 9fd6775

Please sign in to comment.