From d5311c95e66865a75753299e0a30c3106f44405b Mon Sep 17 00:00:00 2001 From: Alex <71931113+af-afk@users.noreply.github.com> Date: Wed, 15 May 2024 12:12:56 +0100 Subject: [PATCH] Develop yield to stakers new migration (#2644) * Tweak the migration for the yield to stakers * Also add sqlfluff to the actions --- .github/workflows/sqlfluff.yml | 25 +++++++++++++++++++ ...-worker_config_enable_yield_to_stakers.sql | 4 +-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/sqlfluff.yml 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;