Skip to content

Commit

Permalink
adjust readme
Browse files Browse the repository at this point in the history
  • Loading branch information
LordSimal committed Dec 28, 2022
1 parent af36f1b commit d0d3835
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

This plugin adds a CakePHP command to easily generate SQL dumps of your configured datasources

Currently only MySQL/MariaDB exports are supported but PostgreSQL and SQLite shouldn't be that hard to integrate along the way.
Currently the following DBMS are integrated:
- MySQL/MariaDB
- SQLite
- PostgreSQL

## Installation

Expand All @@ -25,19 +28,29 @@ bin/cake plugin load CakeDumpSql
public function bootstrap(): void
{
parent::bootstrap();
// Other plugins
$this->addPlugin('CakeDumpSql');
}
```


## Requirements

For each DBMS you need to have its respective dump tool installed.

- MySQL/MariaDB => `mysqldump`
- SQLite => `sqlite3`
- PostgreSQL => `pg_dump`

⚠️ For `pg_dump` it is especially important that you have a compatible version installed. So e.g. if you have a **PostgreSQL 14 server** you need a **pg_dump version 14** ⚠️

## How to use

After installing the plugin you now have a new command available to you:

```
bin/cake dump_sql
bin/cake dump_sql
```

After executing that command you should see a SQL representation of your `default` datasource inside your console.
Expand Down Expand Up @@ -68,4 +81,4 @@ bin/cake dump_sql --gzip > dump.sql.gz

```
bin/cake dump_sql --data-only > data.sql
```
```

0 comments on commit d0d3835

Please sign in to comment.