CREATE TABLE film (
    id INT AUTO_INCREMENT PRIMARY KEY,
    nazev VARCHAR(255),
    datum DATE,
    popis TEXT,
    hodnoceni INT
);

-- Admin table for authentication
CREATE TABLE admin (
    id INT AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(100) NOT NULL UNIQUE,
    password VARCHAR(255) NOT NULL
);

-- Example: create an admin with username 'admin' and password 'heslo123'
-- Generate hash in PHP and replace the HASH_HERE placeholder before importing, e.g.:
-- php -r "echo password_hash('heslo123', PASSWORD_DEFAULT).PHP_EOL;"
-- Then run:
-- INSERT INTO admin (username, password) VALUES ('admin', 'HASH_HERE');