feat: add api keys (#991)
* feat: add api keys * chore: address pull request feedback --------- Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
9
packages/db/migrations/mysql/0009_wakeful_tenebrous.sql
Normal file
9
packages/db/migrations/mysql/0009_wakeful_tenebrous.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE `apiKey` (
|
||||
`id` varchar(64) NOT NULL,
|
||||
`apiKey` text NOT NULL,
|
||||
`salt` text NOT NULL,
|
||||
`userId` varchar(64) NOT NULL,
|
||||
CONSTRAINT `apiKey_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE `apiKey` ADD CONSTRAINT `apiKey_userId_user_id_fk` FOREIGN KEY (`userId`) REFERENCES `user`(`id`) ON DELETE cascade ON UPDATE no action;
|
||||
Reference in New Issue
Block a user