Mariadb Docker image and init.sql

This commit is contained in:
Harshavardhan Musanalli
2026-02-10 21:09:13 +01:00
parent 75cb2657ea
commit ca62f2c2a3
3 changed files with 15 additions and 0 deletions

0
.gitignore vendored Normal file
View File

View File

@@ -4,3 +4,9 @@ This is a practical test for a DevSecOps Engineer candidate at Bank J. Safra Sar
### On 09.02.2026 ### On 09.02.2026
I created repo on https://git.harshanu.space. I'll work on code changes tomorrow as I will be free in the afternoon (Fashing Tuesday, half day work) I created repo on https://git.harshanu.space. I'll work on code changes tomorrow as I will be free in the afternoon (Fashing Tuesday, half day work)
### On 10.02.2026
- Defined the database schema for the API endpoints in `init.sql`.
- Pulled the `docker.io/library/mariadb:12` Docker image.
- Tested the schema by spinning up a MariaDB container and verifying the table creation.
- Python will be used to write API endpoints

9
init.sql Normal file
View File

@@ -0,0 +1,9 @@
CREATE DATABASE IF NOT EXISTS devsecops_db;
USE devsecops_db;
CREATE TABLE IF NOT EXISTS device_registrations (
id INT AUTO_INCREMENT PRIMARY KEY,
user_key VARCHAR(255) NOT NULL,
device_type VARCHAR(50) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);