github.com/matcornic/migrate@v3.3.2-0.20180717234201-feea45c20506+incompatible/database/postgres/README.md (about)

     1  # postgres
     2  
     3  `postgres://user:password@host:port/dbname?query` (`postgresql://` works, too)
     4  
     5  | URL Query  | WithInstance Config | Description |
     6  |------------|---------------------|-------------|
     7  | `x-migrations-table` | `MigrationsTable` | Name of the migrations table |
     8  | `dbname` | `DatabaseName` | The name of the database to connect to |
     9  | `search_path` | | This variable specifies the order in which schemas are searched when an object is referenced by a simple name with no schema specified. |
    10  | `user` | | The user to sign in as |
    11  | `password` | | The user's password | 
    12  | `host` | | The host to connect to. Values that start with / are for unix domain sockets. (default is localhost) |
    13  | `port` | | The port to bind to. (default is 5432) |
    14  | `fallback_application_name` | | An application_name to fall back to if one isn't provided. |
    15  | `connect_timeout` | | Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely. |
    16  | `sslcert` | | Cert file location. The file must contain PEM encoded data. |
    17  | `sslkey` | | Key file location. The file must contain PEM encoded data. |
    18  | `sslrootcert` | | The location of the root certificate file. The file must contain PEM encoded data. | 
    19  | `sslmode` | | Whether or not to use SSL (disable\|require\|verify-ca\|verify-full) |
    20  
    21  
    22  ## Upgrading from v1
    23  
    24  1. Write down the current migration version from schema_migrations
    25  1. `DROP TABLE schema_migrations`
    26  2. Wrap your existing migrations in transactions ([BEGIN/COMMIT](https://www.postgresql.org/docs/current/static/transaction-iso.html)) if you use multiple statements within one migration.
    27  3. Download and install the latest migrate version.
    28  4. Force the current migration version with `migrate force <current_version>`.