mirror of
https://github.com/yandex/pgmigrate.git
synced 2024-09-19 16:17:24 +03:00
Add info about UTF-8 migrations in docs.
This commit is contained in:
parent
77d7df4a22
commit
4c555fab1b
@ -334,3 +334,19 @@ foodb=# SELECT * FROM ops;
|
||||
10 | migration V0003__NONTRANSACTIONAL_Add_index_on_baz_column.sql
|
||||
(10 rows)
|
||||
```
|
||||
|
||||
## UTF-8 Migrations
|
||||
|
||||
In most cases you should avoid non-ascii characters in your migrations.
|
||||
So PGmigrate will complain about them with:
|
||||
```
|
||||
pgmigrate.MalformedStatement: Non ascii symbols in file
|
||||
```
|
||||
|
||||
But sometimes there is no way to avoid migration with UTF-8
|
||||
(imagine a case with inserting some initial data in your database).
|
||||
You could insert modeline in migration file to disable
|
||||
non-ascii characters check:
|
||||
```
|
||||
/* pgmigrate-encoding: utf-8 */
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user