Skip to content

Commit

Permalink
Fix typos and wording (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Dec 21, 2023
1 parent 7e5de49 commit 0bbdb5b
Show file tree
Hide file tree
Showing 19 changed files with 132 additions and 172 deletions.
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -19,10 +19,10 @@ Yii DB Migration allows you to manage database schema using migrations.
Supports the following databases out of the box:

- [MSSQL](https://www.microsoft.com/en-us/sql-server/sql-server-2019) of versions **2017, 2019, 2022**.
- [MySQL](https://www.mysql.com/) of versions **5.7 - 8.0**.
- [MariaDB](https://mariadb.org/) of versions **10.4 - 10.9**.
- [Oracle](https://www.oracle.com/database/) of versions **12c - 21c**.
- [PostgreSQL](https://www.postgresql.org/) of versions **9.6 - 15**.
- [MySQL](https://www.mysql.com/) of versions **5.78.0**.
- [MariaDB](https://mariadb.org/) of versions **10.410.9**.
- [Oracle](https://www.oracle.com/database/) of versions **12c21c**.
- [PostgreSQL](https://www.postgresql.org/) of versions **9.615**.
- [SQLite](https://www.sqlite.org/index.html) of version **3.3 and above**.

## Requirements
Expand Down Expand Up @@ -65,7 +65,7 @@ migrate:redo Redoes the last few migrations.
migrate:up Applies new migrations.
```

The create command allows to define fields for the table being created.
The create command allows defining fields for the table being created.

## Support

Expand Down
7 changes: 4 additions & 3 deletions docs/en/testing.md
Expand Up @@ -16,16 +16,17 @@ All our packages have GitHub actions by default, so you can test your [contribut
## Docker images

For greater ease it is recommended to use Docker containers for each DBMS, for this you can use
the [docker-compose.yml](https://docs.docker.com/compose/compose-file/) file that in the root directory of each package.
For greater ease, it's recommended to use Docker containers for each DBMS.
For this, you can use the [docker-compose.yml](https://docs.docker.com/compose/compose-file/) file
in the root directory of each package.

- [MSSQL 2022](https://github.com/yiisoft/db-mssql/blob/master/docker-compose.yml)
- [MySQL 8](https://github.com/yiisoft/db-mysql/blob/master/docker-compose.yml)
- [MariaDB 10.11](https://github.com/yiisoft/db-mysql/blob/master/docker-compose-mariadb.yml)
- [Oracle 21](https://github.com/yiisoft/db-oracle/blob/master/docker-compose.yml)
- [PostgreSQL 15](https://github.com/yiisoft/db-pgsql/blob/master/docker-compose.yml)

For running the Docker containers you can use the following command:
For running the Docker containers, you can use the following command:

```shell
docker compose up -d
Expand Down
33 changes: 16 additions & 17 deletions docs/en/usage-standalone.md
Expand Up @@ -2,24 +2,23 @@

1. Copy configuration file `./vendor/yiisoft/db-migration/bin/yii-db-migration.php` to root folder of your project:

```shell
cp ./vendor/yiisoft/db-migration/bin/yii-db-migration.php ./yii-db-migration.php
```
```shell
cp ./vendor/yiisoft/db-migration/bin/yii-db-migration.php ./yii-db-migration.php
```

2. Define DB connection in configuration file (see
[Yii DB documentation](https://github.com/yiisoft/db/blob/master/docs/en/README.md#create-connection)). For example, MySQL connection:

```php
'db' => new \Yiisoft\Db\Mysql\Connection(
new \Yiisoft\Db\Mysql\Driver('mysql:host=mysql;dbname=mydb', 'user', 'q1w2e3r4'),
new \Yiisoft\Db\Cache\SchemaCache(new \Yiisoft\Cache\ArrayCache()),
),
```

3. Optionally, modify other options in configuration file. Each option has a comment with description.

[Yii DB documentation](https://github.com/yiisoft/db/blob/master/docs/en/README.md#create-connection)).
For example, MySQL connection:
```php
'db' => new \Yiisoft\Db\Mysql\Connection(
new \Yiisoft\Db\Mysql\Driver('mysql:host=mysql;dbname=mydb', 'user', 'q1w2e3r4'),
new \Yiisoft\Db\Cache\SchemaCache(new \Yiisoft\Cache\ArrayCache()),
),
```

3. Optionally, modify other options in the configuration file. Each option has a comment with description.
4. Run the console command without arguments to see the list of available migration commands:

```shell
./vendor/bin/yii-db-migration
```
```shell
./vendor/bin/yii-db-migration
```
2 changes: 1 addition & 1 deletion docs/en/usage-with-yii-console.md
@@ -1,6 +1,6 @@
# Usage with Yii Console

In this example we use [yiisoft/app](https://github.com/yiisoft/app).
In this example, we use [yiisoft/app](https://github.com/yiisoft/app).

First, configure DI container. Create `config/common/db.php` with the following content:

Expand Down
12 changes: 6 additions & 6 deletions src/AbstractMigrationBuilder.php
Expand Up @@ -92,7 +92,7 @@ public function boolean(): ColumnInterface
/**
* Creates a char column.
*
* @param int|null $length the column size definition i.e. the maximum string length.
* @param int|null $length the column size definition, i.e., the maximum string length.
*
* This parameter will be ignored if not supported by the DBMS.
*
Expand Down Expand Up @@ -132,11 +132,11 @@ public function dateTime(int $precision = null): ColumnInterface
* Creates a decimal column.
*
* @param int|null $precision The column value precision, which is usually the total number of digits.
* First parameter passed to the column type, e.g. DECIMAL(precision, scale).
* First parameter passed to the column type, e.g., DECIMAL(precision, scale).
*
* This parameter will be ignored if not supported by the DBMS.
* @param int|null $scale The column value scale, which is usually the number of digits after the decimal point.
* Second parameter passed to the column type, e.g. DECIMAL(precision, scale).
* Second parameter passed to the column type, e.g., DECIMAL(precision, scale).
*
* This parameter will be ignored if not supported by the DBMS.
*
Expand Down Expand Up @@ -215,11 +215,11 @@ public function json(): ColumnInterface
* Creates a money column.
*
* @param int|null $precision The column value precision, which is usually the total number of digits. First
* parameter passed to the column type, e.g. DECIMAL(precision, scale).
* parameter passed to the column type, e.g., DECIMAL(precision, scale).
*
* This parameter will be ignored if not supported by the DBMS.
* @param int|null $scale The column value scale, which is usually the number of digits after the decimal point.
* Second parameter passed to the column type, e.g. DECIMAL(precision, scale).
* Second parameter passed to the column type, e.g., DECIMAL(precision, scale).
*
* This parameter will be ignored if not supported by the DBMS.
*
Expand Down Expand Up @@ -271,7 +271,7 @@ public function smallInteger(int $length = null): ColumnInterface
/**
* Creates a string column.
*
* @param int|null $length The column size definition i.e. the maximum string length.
* @param int|null $length The column size definition, i.e., the maximum string length.
*
* This parameter will be ignored if not supported by the DBMS.
*
Expand Down

0 comments on commit 0bbdb5b

Please sign in to comment.