Commit ef27ca04 authored by Alessio Parma's avatar Alessio Parma 🐔

Update README.md

parent e25e60f0
......@@ -71,17 +71,34 @@ Docker image can be configured using the following environment variables:
### Database
Script for API Keys table for SQL Server:
Script for API keys table for PostgreSQL:
```sql
CREATE TABLE "api_keys" (
"id" BIGINT NOT NULL DEFAULT 'nextval(''api_keys_id_seq''::regclass)',
"value" VARCHAR(32) NOT NULL,
"name" VARCHAR(100) NULL DEFAULT NULL,
"created_at" TIMESTAMP NOT NULL DEFAULT 'CURRENT_TIMESTAMP',
"expires_at" TIMESTAMP NULL DEFAULT NULL,
"temporary" BOOLEAN NOT NULL DEFAULT 'false',
PRIMARY KEY ("id"),
UNIQUE INDEX "uk_api_keys" ("value")
)
;
```
Script for API keys table for SQL Server:
```sql
CREATE TABLE [dbo].[api_keys](
[id] [bigint] IDENTITY(1,1) NOT NULL,
[name] [nvarchar](100) NOT NULL,
[value] [nchar](32) NOT NULL,
[value] [nvarchar](32) NOT NULL,
[created_at] [datetimeoffset](7) NOT NULL DEFAULT GETUTCDATE(),
[expires_at] [datetimeoffset](7) NULL,
[temporary] [bit] NOT NULL DEFAULT 0,
CONSTRAINT [pk_api_keys] PRIMARY KEY CLUSTERED ([id] ASC),
CONSTRAINT [ak_api_keys] UNIQUE ([name] ASC)
CONSTRAINT [ak_api_keys] UNIQUE ([value] ASC)
)
GO
```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment