mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
Implement authentication
This commit is contained in:
parent
cdcd71cf2a
commit
3e4551ea7a
23 changed files with 656 additions and 406 deletions
23
prisma/migrations/20241120013541_fix_forgors/migration.sql
Normal file
23
prisma/migrations/20241120013541_fix_forgors/migration.sql
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE `config` MODIFY `createdAt` DATETIME(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
MODIFY `updatedAt` DATETIME(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0);
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `forgors` MODIFY `createdAt` DATETIME(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
MODIFY `updatedAt` DATETIME(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0);
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `users` MODIFY `createdAt` DATETIME(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
MODIFY `updatedAt` DATETIME(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `Session` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`username` VARCHAR(255) NOT NULL,
|
||||
`expiresAt` DATETIME(3) NOT NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `Session` ADD CONSTRAINT `Session_id_fkey` FOREIGN KEY (`id`) REFERENCES `users`(`username`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
Loading…
Add table
Add a link
Reference in a new issue