forked from lukevella/rallly
-
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.
Updated links model and poll page (lukevella#206)
* Improved sharing * Updated desktop poll
- Loading branch information
Showing
50 changed files
with
951 additions
and
1,844 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
26 changes: 26 additions & 0 deletions
26
prisma/migrations/20220623175037_remove_links_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,26 @@ | ||
-- AlterTable | ||
ALTER TABLE "polls" | ||
ADD COLUMN "admin_url_id" TEXT, | ||
ADD COLUMN "participant_url_id" TEXT; | ||
|
||
UPDATE polls | ||
SET participant_url_id=(SELECT url_id FROM links WHERE polls.url_id=links.poll_id AND links."role"='participant'); | ||
|
||
UPDATE polls | ||
SET admin_url_id=(SELECT url_id FROM links WHERE polls.url_id=links.poll_id AND links."role"='admin'); | ||
|
||
ALTER TABLE "polls" | ||
ALTER COLUMN "admin_url_id" SET NOT NULL, | ||
ALTER COLUMN "participant_url_id" SET NOT NULL; | ||
|
||
-- DropTable | ||
DROP TABLE "links"; | ||
|
||
-- DropEnum | ||
DROP TYPE "role"; | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "polls_participant_url_id_key" ON "polls"("participant_url_id"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "polls_admin_url_id_key" ON "polls"("admin_url_id"); |
21 changes: 21 additions & 0 deletions
21
prisma/migrations/20220624111614_rename_poll_id/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,21 @@ | ||
/* | ||
Warnings: | ||
- The primary key for the `polls` table will be changed. If it partially fails, the table could be left without primary key constraint. | ||
- You are about to drop the column `url_id` on the `polls` table. All the data in the column will be lost. | ||
- A unique constraint covering the columns `[id]` on the table `polls` will be added. If there are existing duplicate values, this will fail. | ||
- Added the required column `id` to the `polls` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- DropIndex | ||
DROP INDEX "Poll_urlId_key"; | ||
|
||
-- DropIndex | ||
DROP INDEX "polls_url_id_key"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "polls" | ||
RENAME COLUMN "url_id" TO "id"; | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "polls_id_key" ON "polls"("id"); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"getStarted": "Get started", | ||
"viewDemo": "View demo", | ||
"viewDemo": "Live demo", | ||
"footerCredit": "Self-funded and built by <a>@imlukevella</a>" | ||
} |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.