Skip to content

Commit

Permalink
🎉 0.2.0-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Oct 26, 2021
1 parent 84695b3 commit e357902
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 116 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "snailycad",
"version": "0.1.0-alpha",
"version": "0.2.0-alpha",
"packageManager": "[email protected]",
"workspaces": [
"packages/**"
Expand Down
6 changes: 3 additions & 3 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@snailycad/api",
"version": "0.1.0-alpha",
"version": "0.2.0-alpha",
"scripts": {
"dev": "prisma migrate dev && prisma generate && nodemon --watch \"src/**/*.ts\" --ignore \"node_modules/**/*\" --exec ts-node src/main.ts",
"start": "yarn workspace @snailycad/schemas build && yarn workspace @snailycad/config build && npx prisma migrate deploy && ts-node src/main.ts",
Expand All @@ -24,8 +24,8 @@
"dependencies": {
"@casper124578/utils": "^1.4.0",
"@prisma/client": "^3.3.0",
"@snailycad/config": "0.1.0-alpha",
"@snailycad/schemas": "0.1.0-alpha",
"@snailycad/config": "0.2.0-alpha",
"@snailycad/schemas": "0.2.0-alpha",
"@tsed/common": "^6.75.7",
"@tsed/core": "^6.75.7",
"@tsed/di": "^6.75.7",
Expand Down
20 changes: 0 additions & 20 deletions packages/api/prisma/migrations/20211024124930_/migration.sql

This file was deleted.

21 changes: 0 additions & 21 deletions packages/api/prisma/migrations/20211025145727_/migration.sql

This file was deleted.

17 changes: 0 additions & 17 deletions packages/api/prisma/migrations/20211025150350_/migration.sql

This file was deleted.

17 changes: 0 additions & 17 deletions packages/api/prisma/migrations/20211025152858_/migration.sql

This file was deleted.

12 changes: 0 additions & 12 deletions packages/api/prisma/migrations/20211026055452_/migration.sql

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- CreateEnum
CREATE TYPE "Rank" AS ENUM ('OWNER', 'ADMIN', 'MODERATOR', 'USER');
CREATE TYPE "Rank" AS ENUM ('OWNER', 'ADMIN', 'USER');

-- CreateEnum
CREATE TYPE "WhitelistStatus" AS ENUM ('ACCEPTED', 'PENDING', 'DECLINED');
Expand All @@ -17,7 +17,7 @@ CREATE TYPE "StatusEnum" AS ENUM ('ON_DUTY', 'OFF_DUTY');
CREATE TYPE "WhatPages" AS ENUM ('DISPATCH', 'EMS_FD', 'LEO');

-- CreateEnum
CREATE TYPE "ShouldDoType" AS ENUM ('SET_OFF_DUTY', 'SET_STATUS');
CREATE TYPE "ShouldDoType" AS ENUM ('SET_OFF_DUTY', 'SET_ON_DUTY', 'SET_ASSIGNED', 'SET_STATUS');

-- CreateEnum
CREATE TYPE "BoloType" AS ENUM ('VEHICLE', 'PERSON', 'OTHER');
Expand Down Expand Up @@ -59,8 +59,8 @@ CREATE TABLE "MiscCadSettings" (
"maxCitizensPerUser" INTEGER,
"maxPlateLength" INTEGER NOT NULL DEFAULT 8,
"maxBusinessesPerCitizen" INTEGER,
"assignedStatusCode" TEXT NOT NULL DEFAULT E'10-97',
"onDutyCode" TEXT NOT NULL DEFAULT E'10-8',
"callsignTemplate" TEXT NOT NULL DEFAULT E'{department}{callsign1} - {callsign2}{division}',
"pairedUnitSymbol" VARCHAR(255) NOT NULL DEFAULT E'A',

CONSTRAINT "MiscCadSettings_pkey" PRIMARY KEY ("id")
);
Expand Down Expand Up @@ -180,6 +180,7 @@ CREATE TABLE "DivisionValue" (
"id" TEXT NOT NULL,
"valueId" TEXT NOT NULL,
"departmentId" TEXT,
"callsign" TEXT,

CONSTRAINT "DivisionValue_pkey" PRIMARY KEY ("id")
);
Expand Down Expand Up @@ -290,8 +291,7 @@ CREATE TABLE "Officer" (
"callsign" VARCHAR(255) NOT NULL,
"divisionId" TEXT NOT NULL,
"rankId" TEXT,
"status" "StatusEnum" NOT NULL DEFAULT E'OFF_DUTY',
"status2Id" TEXT,
"statusId" TEXT,
"suspended" BOOLEAN NOT NULL DEFAULT false,
"badgeNumber" INTEGER,
"citizenId" TEXT,
Expand Down Expand Up @@ -394,8 +394,7 @@ CREATE TABLE "EmsFdDeputy" (
"callsign" VARCHAR(255) NOT NULL,
"divisionId" TEXT NOT NULL,
"rankId" TEXT,
"status" "StatusEnum" NOT NULL DEFAULT E'OFF_DUTY',
"status2Id" TEXT,
"statusId" TEXT,
"suspended" BOOLEAN NOT NULL DEFAULT false,
"badgeNumber" INTEGER,
"citizenId" TEXT,
Expand All @@ -416,6 +415,12 @@ CREATE TABLE "TruckLog" (
CONSTRAINT "TruckLog_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "_PenalCodeToRecord" (
"A" TEXT NOT NULL,
"B" TEXT NOT NULL
);

-- CreateIndex
CREATE UNIQUE INDEX "User_username_key" ON "User"("username");

Expand All @@ -428,6 +433,12 @@ CREATE UNIQUE INDEX "RegisteredVehicle_plate_key" ON "RegisteredVehicle"("plate"
-- CreateIndex
CREATE UNIQUE INDEX "Weapon_serialNumber_key" ON "Weapon"("serialNumber");

-- CreateIndex
CREATE UNIQUE INDEX "_PenalCodeToRecord_AB_unique" ON "_PenalCodeToRecord"("A", "B");

-- CreateIndex
CREATE INDEX "_PenalCodeToRecord_B_index" ON "_PenalCodeToRecord"("B");

-- AddForeignKey
ALTER TABLE "cad" ADD CONSTRAINT "cad_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

Expand Down Expand Up @@ -485,9 +496,6 @@ ALTER TABLE "MedicalRecord" ADD CONSTRAINT "MedicalRecord_userId_fkey" FOREIGN K
-- AddForeignKey
ALTER TABLE "MedicalRecord" ADD CONSTRAINT "MedicalRecord_citizenId_fkey" FOREIGN KEY ("citizenId") REFERENCES "Citizen"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "PenalCode" ADD CONSTRAINT "PenalCode_recordId_fkey" FOREIGN KEY ("recordId") REFERENCES "Record"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "DivisionValue" ADD CONSTRAINT "DivisionValue_valueId_fkey" FOREIGN KEY ("valueId") REFERENCES "Value"("id") ON DELETE CASCADE ON UPDATE CASCADE;

Expand Down Expand Up @@ -561,10 +569,10 @@ ALTER TABLE "Officer" ADD CONSTRAINT "Officer_divisionId_fkey" FOREIGN KEY ("div
ALTER TABLE "Officer" ADD CONSTRAINT "Officer_rankId_fkey" FOREIGN KEY ("rankId") REFERENCES "Value"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Officer" ADD CONSTRAINT "Officer_status2Id_fkey" FOREIGN KEY ("status2Id") REFERENCES "StatusValue"("id") ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE "Officer" ADD CONSTRAINT "Officer_statusId_fkey" FOREIGN KEY ("statusId") REFERENCES "StatusValue"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Officer" ADD CONSTRAINT "Officer_citizenId_fkey" FOREIGN KEY ("citizenId") REFERENCES "Citizen"("id") ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE "Officer" ADD CONSTRAINT "Officer_citizenId_fkey" FOREIGN KEY ("citizenId") REFERENCES "Citizen"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Officer" ADD CONSTRAINT "Officer_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
Expand Down Expand Up @@ -612,7 +620,7 @@ ALTER TABLE "EmsFdDeputy" ADD CONSTRAINT "EmsFdDeputy_divisionId_fkey" FOREIGN K
ALTER TABLE "EmsFdDeputy" ADD CONSTRAINT "EmsFdDeputy_rankId_fkey" FOREIGN KEY ("rankId") REFERENCES "Value"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "EmsFdDeputy" ADD CONSTRAINT "EmsFdDeputy_status2Id_fkey" FOREIGN KEY ("status2Id") REFERENCES "StatusValue"("id") ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE "EmsFdDeputy" ADD CONSTRAINT "EmsFdDeputy_statusId_fkey" FOREIGN KEY ("statusId") REFERENCES "StatusValue"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "EmsFdDeputy" ADD CONSTRAINT "EmsFdDeputy_citizenId_fkey" FOREIGN KEY ("citizenId") REFERENCES "Citizen"("id") ON DELETE CASCADE ON UPDATE CASCADE;
Expand All @@ -628,3 +636,9 @@ ALTER TABLE "TruckLog" ADD CONSTRAINT "TruckLog_userId_fkey" FOREIGN KEY ("userI

-- AddForeignKey
ALTER TABLE "TruckLog" ADD CONSTRAINT "TruckLog_vehicleId_fkey" FOREIGN KEY ("vehicleId") REFERENCES "RegisteredVehicle"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "_PenalCodeToRecord" ADD FOREIGN KEY ("A") REFERENCES "PenalCode"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "_PenalCodeToRecord" ADD FOREIGN KEY ("B") REFERENCES "Record"("id") ON DELETE CASCADE ON UPDATE CASCADE;
6 changes: 3 additions & 3 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@snailycad/client",
"version": "0.1.0-alpha",
"version": "0.2.0-alpha",
"scripts": {
"dev": "next dev",
"build": "next build",
Expand All @@ -12,8 +12,8 @@
"@casper124578/use-socket.io": "2.0.0",
"@casper124578/utils": "^1.4.0",
"@headlessui/react": "^1.4.1",
"@snailycad/config": "0.1.0-alpha",
"@snailycad/schemas": "0.1.0-alpha",
"@snailycad/config": "0.2.0-alpha",
"@snailycad/schemas": "0.2.0-alpha",
"axios": "^0.24.0",
"date-fns": "^2.25.0",
"formik": "^2.2.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@snailycad/config",
"version": "0.1.0-alpha",
"version": "0.2.0-alpha",
"main": "./dist/index.js",
"scripts": {
"build": "tsc"
Expand Down
2 changes: 1 addition & 1 deletion packages/schemas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@snailycad/schemas",
"version": "0.1.0-alpha",
"version": "0.2.0-alpha",
"main": "./dist/index.js",
"scripts": {
"build": "tsc"
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,8 @@ __metadata:
dependencies:
"@casper124578/utils": ^1.4.0
"@prisma/client": ^3.3.0
"@snailycad/config": 0.1.0-alpha
"@snailycad/schemas": 0.1.0-alpha
"@snailycad/config": 0.2.0-alpha
"@snailycad/schemas": 0.2.0-alpha
"@tsed/common": ^6.75.7
"@tsed/core": ^6.75.7
"@tsed/di": ^6.75.7
Expand Down Expand Up @@ -711,8 +711,8 @@ __metadata:
"@casper124578/use-socket.io": 2.0.0
"@casper124578/utils": ^1.4.0
"@headlessui/react": ^1.4.1
"@snailycad/config": 0.1.0-alpha
"@snailycad/schemas": 0.1.0-alpha
"@snailycad/config": 0.2.0-alpha
"@snailycad/schemas": 0.2.0-alpha
"@types/react": ^17.0.33
"@types/react-dom": ^17.0.10
autoprefixer: ^10.3.7
Expand All @@ -739,7 +739,7 @@ __metadata:
languageName: unknown
linkType: soft

"@snailycad/config@0.1.0-alpha, @snailycad/config@workspace:packages/config":
"@snailycad/config@0.2.0-alpha, @snailycad/config@workspace:packages/config":
version: 0.0.0-use.local
resolution: "@snailycad/config@workspace:packages/config"
dependencies:
Expand All @@ -748,7 +748,7 @@ __metadata:
languageName: unknown
linkType: soft

"@snailycad/schemas@0.1.0-alpha, @snailycad/schemas@workspace:packages/schemas":
"@snailycad/schemas@0.2.0-alpha, @snailycad/schemas@workspace:packages/schemas":
version: 0.0.0-use.local
resolution: "@snailycad/schemas@workspace:packages/schemas"
dependencies:
Expand Down

0 comments on commit e357902

Please sign in to comment.