diff --git a/.github/workflows/sqlfluff.yml b/.github/workflows/sqlfluff.yml new file mode 100644 index 000000000..7f5b655a0 --- /dev/null +++ b/.github/workflows/sqlfluff.yml @@ -0,0 +1,25 @@ +name: sqlfluff + +on: + pull_request: + branches: + - development + +jobs: + sqlfluff: + name: sqlfluff + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: yu-iskw/action-sqlfluff@v3.7.0 + id: lint-sql + with: + github_token: ${{ secrets.github_token }} + sqlfluff_version: "3.0.6" + paths: '${{ github.workspace }}/database/migrations' + level: 'info' + - name: 'Show outputs (Optional)' + shell: bash + run: | + echo '${{ steps.lint-sql.outputs.sqlfluff-results }}' | jq -r '.' + echo '${{ steps.lint-sql.outputs.sqlfluff-results-rdjson }}' | jq -r '.' diff --git a/database/101-up-postgres/20240508052809-worker_config_enable_yield_to_stakers.sql b/database/101-up-postgres/20240508052809-worker_config_enable_yield_to_stakers.sql index 72c50af44..928ed8f8b 100644 --- a/database/101-up-postgres/20240508052809-worker_config_enable_yield_to_stakers.sql +++ b/database/101-up-postgres/20240508052809-worker_config_enable_yield_to_stakers.sql @@ -2,9 +2,9 @@ -- migrate:up ALTER TABLE worker_config_ethereum - ADD COLUMN yield_to_stakers NOT NULL DEFAULT FALSE; + ADD COLUMN yield_to_stakers BOOLEAN NOT NULL DEFAULT FALSE; -- migrate:down ALTER TABLE worker_config_ethereum - DROP COLUMN yield_to_stakers NOT NULL DEFAULT FALSE; + DROP COLUMN yield_to_stakers;