2.4 Database Setup
How to create and configure the JSONAir database.
1. Create the Database and User
CREATE DATABASE jsonair CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'jsonair'@'%' IDENTIFIED BY 'your-strong-password';
GRANT SELECT, INSERT, UPDATE, DELETE ON jsonair.* TO 'jsonair'@'%';
FLUSH PRIVILEGES;2. Import the Schema
mysql -u jsonair -p jsonair < sql/jsonair.sql3. Table Overview
keys
keysColumn
Type
Description
configurations
configurationsColumn
Type
Description
4. Adding an API Key
Step 1 — Choose a plain-text PAT
Step 2 — Hash the token
Step 3 — Generate a UUID
Step 4 — Insert the key
5. Adding a Configuration
Step 1 — Base64-encode your configuration
Step 2 — Encrypt the Base64 output
Step 3 — Insert the configuration
6. Environment Variables
Variable
Description
Last updated