Skip to content

Commit

Permalink
Tweak DB names
Browse files Browse the repository at this point in the history
  • Loading branch information
Jbithell committed Apr 17, 2024
1 parent 50bd46a commit 43f9360
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cloudflare-pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
command: pages deploy ./build/client --project-name=bithellstudios-telemetry-and-analytics --commit-dirty=true
postCommands: |
echo "*** Running D1 Migrations ***"
wrangler d1 migrations apply bithellstudios-telemetry-analytics-prod --remote
wrangler d1 migrations apply DB --remote
echo "******"
2 changes: 1 addition & 1 deletion .github/workflows/migrate-preview-d1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
packageManager: npm
command: d1 migrations apply bithellstudios-telemetry-analytics-preview --remote=true
command: d1 migrations apply DB --preview --remote=true
4 changes: 2 additions & 2 deletions .github/workflows/reset-preview-d1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
packageManager: npm
command: wrangler d1 execute bithellstudios-telemetry-analytics-preview --remote=true --command="PRAGMA defer_foreign_keys = true; DROP TABLE IF EXISTS adamrmsinstallations; PRAGMA defer_foreign_keys = false;"
command: wrangler d1 execute DB --preview --remote=true --command="PRAGMA defer_foreign_keys = true; DROP TABLE IF EXISTS adamrmsinstallations; PRAGMA defer_foreign_keys = false;"
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
packageManager: npm
command: d1 migrations apply bithellstudios-telemetry-analytics-preview --remote=true"
command: d1 migrations apply DB --preview --remote=true"
2 changes: 1 addition & 1 deletion wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pages_build_output_dir = "public"
compatibility_date = "2023-12-31"
send_metrics = true


# This is used by wrangler to figure out which is preview and which isn't
[[d1_databases]]
binding = "DB"
database_id = "67e79b07-81ca-4e5c-ab60-323e45555e11"
Expand Down

0 comments on commit 43f9360

Please sign in to comment.