-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from frankhereford/track-changes
Create Moves model and start capturing moves into it
- Loading branch information
Showing
7 changed files
with
116 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release-on-push: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
steps: | ||
- uses: rymndhng/[email protected] | ||
with: | ||
bump_version_scheme: minor | ||
use_github_release_notes: true | ||
- name: Check Output Parameters | ||
run: | | ||
echo "Got tag name ${{ steps.release.outputs.tag_name }}" | ||
echo "Got release version ${{ steps.release.outputs.version }}" | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set version | ||
id: package_version | ||
uses: KageKirin/set-node-package-version@v0 | ||
with: | ||
version: ${{ steps.release.outputs.version }} | ||
|
||
- name: Commit new version | ||
run: | | ||
git commit -am "CI: update version from PR release" | ||
git push https://${{ github.token }}@github.com/OWNER/REPO |
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
34 changes: 34 additions & 0 deletions
34
prisma/migrations/20221115233313_add_moves_model/migration.sql
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,34 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `last_update` on the `blocks` table. All the data in the column will be lost. | ||
- You are about to drop the column `moves` on the `pentas` table. All the data in the column will be lost. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "blocks" DROP COLUMN "last_update", | ||
ADD COLUMN "lastUpdate" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP; | ||
|
||
-- AlterTable | ||
ALTER TABLE "pentas" DROP COLUMN "moves", | ||
ADD COLUMN "moveCount" INTEGER NOT NULL DEFAULT 0; | ||
|
||
-- CreateTable | ||
CREATE TABLE "Move" ( | ||
"id" TEXT NOT NULL, | ||
"pentaId" TEXT NOT NULL, | ||
"blockId" TEXT NOT NULL, | ||
"moveDate" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"visible" BOOLEAN NOT NULL DEFAULT false, | ||
"translation" JSONB NOT NULL, | ||
"rotation" JSONB NOT NULL, | ||
"reflection" BOOLEAN NOT NULL, | ||
|
||
CONSTRAINT "Move_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Move" ADD CONSTRAINT "Move_pentaId_fkey" FOREIGN KEY ("pentaId") REFERENCES "pentas"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Move" ADD CONSTRAINT "Move_blockId_fkey" FOREIGN KEY ("blockId") REFERENCES "blocks"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
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