-
-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
443 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/*new-migration* | ||
**/*new-seed* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
This example demonstrates how to set up umzug with a raw sql client. | ||
|
||
Note: this is really just a toy example to show how you can use pre-existing sql queries. If you want a raw sql migrator for postgres, see [@slonik/migrator](https://npmjs.com/package/@slonik/migrator). It uses umzug in a similar way, with [slonik](https://npmjs.com/package/slonik) as the underlying client, and it adds transactions, locking, supports typescript/javascript alongside sql, and some additional safety checks. | ||
|
||
```bash | ||
node migrate up | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
This example demonstrates how to use umzug events. In this example, an internal service is shut down before migrations running (hopefully, you wouldn't actually need to do this - it's just a demo of how you _could_ use the events emitted by the umzug instance). | ||
|
||
```bash | ||
node migrate up | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: 'module', | ||
project: ['./tsconfig.json'], | ||
}, | ||
plugins: ['codegen'], | ||
ignorePatterns: ['.eslintrc.js', 'migrate.js'], | ||
ignorePatterns: ['.eslintrc.js', 'migrate/index.js'], | ||
rules: { | ||
'codegen/codegen': 'error', | ||
} | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.cache | ||
package-lock.json | ||
yarn.lock | ||
migrate.js | ||
migrate/index.js |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// The content in this file is autogenerated by eslint. So any IDE with an eslint extension will automatically | ||
// sync it, or a lint task such as `yarn lint --fix`. | ||
// Ideally there should be a CI job that runs `yarn lint` - and will fail if it ever does get out of date. | ||
// See https://npmjs.com/package/eslint-plugin-codegen for more details. | ||
|
||
// codegen:start {preset: barrel, include: './*.ts', import: star, export: {name: migrations, keys: path}} | ||
import * as _20201209T192431UsersTable from './2020.12.09T19.24.31.users-table' | ||
import * as _20201209T192509RolesTable from './2020.12.09T19.25.09.roles-table' | ||
|
||
export const migrations = { | ||
"./2020.12.09T19.24.31.users-table": _20201209T192431UsersTable, | ||
"./2020.12.09T19.25.09.roles-table": _20201209T192509RolesTable | ||
} | ||
// codegen:end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
This folder contains several minimal umzug setups. You can try them out by cloning this repo, running `npm install`, then `cd`ing into the folders. Or just browse them on GitHub and copy-paste what you need. Each has a short readme. | ||
This folder contains several minimal umzug setups. You can try them out by cloning this repo, running `npm install`, then `cd`ing into the folders. Or just browse them on GitHub and copy-paste what you need. Each has a short readme with a set of shell commands showing a sample usage. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.