-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gen: ask user if he manages single schema or multiple (#329)
- Loading branch information
Showing
12 changed files
with
322 additions
and
123 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 |
---|---|---|
|
@@ -21,6 +21,7 @@ type ( | |
ConfigPath string | ||
Env string | ||
CreateDevURL bool | ||
SchemaScope bool | ||
} | ||
) | ||
|
||
|
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
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Atlas | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- .github/workflows/ci-atlas.yaml | ||
- 'migrations/*' | ||
pull_request: | ||
paths: | ||
- 'migrations/*' | ||
# Permissions to write comments on the pull request. | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
jobs: | ||
atlas: | ||
services: | ||
# Spin up a mysql:8 container to be used as the dev-database for analysis. | ||
mysql: | ||
image: mysql:8 | ||
env: | ||
MYSQL_DATABASE: dev | ||
MYSQL_ROOT_PASSWORD: pass | ||
ports: | ||
- 3306:3306 | ||
options: >- | ||
--health-cmd "mysqladmin ping -ppass" | ||
--health-interval 10s | ||
--health-start-period 10s | ||
--health-timeout 5s | ||
--health-retries 10 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: ariga/setup-atlas@v0 | ||
with: | ||
cloud-token: ${{ secrets.ATLAS_CLOUD_TOKEN }} | ||
- uses: ariga/atlas-action/migrate/lint@v1 | ||
with: | ||
dir: 'file://migrations' | ||
dir-name: 'name' | ||
dev-url: 'mysql://root:pass@localhost:3306/dev' | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- uses: ariga/atlas-action/migrate/push@v1 | ||
if: github.ref == 'refs/heads/master' | ||
with: | ||
dir: 'file://migrations' | ||
dir-name: 'name' | ||
dev-url: 'mysql://root:pass@localhost:3306/dev' |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Atlas | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- .github/workflows/ci-atlas.yaml | ||
- 'migrations/*' | ||
pull_request: | ||
paths: | ||
- 'migrations/*' | ||
# Permissions to write comments on the pull request. | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
jobs: | ||
atlas: | ||
services: | ||
# Spin up a postgres:15 container to be used as the dev-database for analysis. | ||
postgres: | ||
image: postgres:15 | ||
env: | ||
POSTGRES_DB: dev | ||
POSTGRES_PASSWORD: pass | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-start-period 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: ariga/setup-atlas@v0 | ||
with: | ||
cloud-token: ${{ secrets.ATLAS_CLOUD_TOKEN }} | ||
- uses: ariga/atlas-action/migrate/lint@v1 | ||
with: | ||
dir: 'file://migrations' | ||
dir-name: 'name' | ||
dev-url: 'postgres://postgres:pass@localhost:5432/dev?search_path=public&sslmode=disable' | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- uses: ariga/atlas-action/migrate/push@v1 | ||
if: github.ref == 'refs/heads/master' | ||
with: | ||
dir: 'file://migrations' | ||
dir-name: 'name' | ||
dev-url: 'postgres://postgres:pass@localhost:5432/dev?search_path=public&sslmode=disable' |
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.