Lucia Authentication (#8)
* initial lucia installation * added prismAdapter for lucia * fixed adapter * main lucia set * moved into correct folder * fixed * removed npm lock * removed supabase(i swear) * Lucia register done * lucia login done * removed * fixed issues with uuid * fixed all commented issues * fixed event param * Update +page.server.ts Signed-off-by: DanMihailescu <as42554525@yahoo.ca> * Update lucia.ts Signed-off-by: DanMihailescu <as42554525@yahoo.ca> --------- Signed-off-by: DanMihailescu <as42554525@yahoo.ca> Co-authored-by: Dan Mihailescu <dan.mihailescu5@gmail.com>
This commit is contained in:
parent
242ec113f6
commit
992eb07f5c
11 changed files with 108 additions and 72 deletions
24
prisma/migrations/20241215222709_removed_issue/migration.sql
Normal file
24
prisma/migrations/20241215222709_removed_issue/migration.sql
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- The primary key for the `Post` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||
|
||||
*/
|
||||
-- RedefineTables
|
||||
PRAGMA defer_foreign_keys=ON;
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_Post" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"title" TEXT NOT NULL,
|
||||
"content" TEXT NOT NULL,
|
||||
"published" BOOLEAN DEFAULT false,
|
||||
"authorId" TEXT NOT NULL,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
CONSTRAINT "Post_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_Post" ("authorId", "content", "createdAt", "id", "published", "title", "updatedAt") SELECT "authorId", "content", "createdAt", "id", "published", "title", "updatedAt" FROM "Post";
|
||||
DROP TABLE "Post";
|
||||
ALTER TABLE "new_Post" RENAME TO "Post";
|
||||
PRAGMA foreign_keys=ON;
|
||||
PRAGMA defer_foreign_keys=OFF;
|
||||
Loading…
Add table
Add a link
Reference in a new issue