CREATE DATABASE IF NOT EXISTS scoutapp;

USE scoutapp;

CREATE TABLE IF NOT EXISTS kegiatan_pramuka (
    id_kegiatan INT AUTO_INCREMENT PRIMARY KEY,
    tanggal DATE NOT NULL,
    materi VARCHAR(255) NOT NULL,
    pembimbing VARCHAR(255) NOT NULL
);

CREATE TABLE IF NOT EXISTS galeri (
    id INT AUTO_INCREMENT PRIMARY KEY,
    id_kegiatan INT,
    tanggal DATE NOT NULL,
    deskripsi TEXT,
    file VARCHAR(255),
    FOREIGN KEY (id_kegiatan) REFERENCES kegiatan_pramuka(id_kegiatan)
);

CREATE TABLE IF NOT EXISTS users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(255) UNIQUE NOT NULL,
    password VARCHAR(255) NOT NULL
);
