Writes ../secrets/db_credentials.php, ../secrets/email_secret.php, and ../secrets/app_secret.php.
Creates required tables from /migrations and tracks applied files.
This step unlocks only when the users table exists and has zero users.