Skip to content

Commit

Permalink
feat: 🐛 migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
ignazio-bovo committed Aug 7, 2023
1 parent e953bc6 commit d976b58
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,29 @@ name: Tests
on: [push, pull_request]

jobs:
migrations:
name: Run migrations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Prepare workspace
run: make prepare
- name: Start db
run: docker-compose up -d orion_db
- name: Wait for db
run: |
while ! docker-compose exec -T orion_db pg_isready -U postgres -p 23798; do
sleep 1
done
- name: Run migrations
run: make migrate
auth-api:
name: Auth API tests
needs: [migrations]
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
3 changes: 1 addition & 2 deletions db/migrations/2000000000000-Views.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ module.exports = class Views2000000000000 {
`("type"->>'channel' IS NULL OR EXISTS(SELECT 1 FROM "channel" WHERE "id"="type"->>'channel'))`,
`("type"->>'video' IS NULL OR EXISTS(SELECT 1 FROM "video" WHERE "id"="type"->>'video'))`
],
runtime_notification: [`EXISTS(SELECT 1 FROM "event" WHERE "id"="event_id")`],
nft_history_entry: [`EXISTS(SELECT 1 FROM "event" WHERE "id"="event_id")`],
nft_activity: [`EXISTS(SELECT 1 FROM "event" WHERE "id"="event_id")`],
// HIDDEN entities
video_view_event: ['FALSE'],
notification: ['FALSE'],
channel_follow: ['FALSE'],
report: ['FALSE'],
exclusion: ['FALSE'],
Expand All @@ -78,7 +78,6 @@ module.exports = class Views2000000000000 {
token: ['FALSE'],
nft_featuring_request: ['FALSE'],
gateway_config: ['FALSE'],
off_chain_notification: [`FALSE`],
}
}

Expand Down

0 comments on commit d976b58

Please sign in to comment.