{% extends 'base.html' %} {% block title %}Database Management - Manufacturing App{% endblock %} {% block content %}

Database Management

Database Information
Database Engine: SQLite
Database File: db.sqlite3
Location: Project Root
Size: {{ db_size|default:"Calculating..." }}
Last Modified: {{ db_modified|default:"Unknown" }}
Backup Database

Create a backup of the current database. The backup will be saved in the 'backups' folder.

{% csrf_token %}
Backup files are saved with timestamps for easy identification.
Restore Database
Warning: Restoring a database will overwrite the current database. A safety backup of the current database will be created automatically before restoration.
{% csrf_token %}
Only SQLite database files (.sqlite3, .db) are supported.
Available Backups
{% if available_backups %}
{% for backup in available_backups %}
{{ backup.name }}
{{ backup.size }}
{{ backup.modified }}
{% endfor %}
{% else %}

No backup files found.

{% endif %}
Database Statistics

{{ total_users|default:"0" }}

Total Users

{{ total_products|default:"0" }}

Total Products

{{ total_orders|default:"0" }}

Total Orders

{{ total_customers|default:"0" }}

Total Customers

{% endblock %} {% block extra_js %} {% endblock %}