{% extends "base.html" %} {% block title %}{{ _('Database Management') }}{% endblock %} {% block content %}
{% if db_info.type == 'SQLite' %} SQLite {% else %} PostgreSQL {% endif %}
{{ db_info.url }}
{{ _('Sites') }}
{{ _('Stratigraphic Units') }}
{{ _('Inventory') }}
Create a new empty database with full PyArchInit-Mini schema.
~/.pyarchinit_mini/data/[name].db
The new database will include all PyArchInit-Mini tables:
{{ _('Migrate all data from source database to target database. Supports bidirectional migration between SQLite and PostgreSQL.') }}
{{ _('Skip records with conflicting IDs. Target data is preserved, only new records are added.') }}
{{ _('Update existing records with source data. Use when source has the latest information.') }}
{{ _('Generate new IDs for conflicting records. Keeps all data from both databases.') }}
| {{ _('Name') }} | {{ _('Type') }} | {{ _('Description') }} | {{ _('Source') }} | {{ _('Actions') }} |
|---|---|---|---|---|
| {{ name }} {% if conn.url == db_info.url %} {{ _('Active') }} {% endif %} | {% if conn.type == 'sqlite' %} SQLite {% else %} PostgreSQL {% endif %} | {{ conn.description or '-' }} | {% if conn.uploaded %} {{ _('Uploaded') }} {% else %} Default {% endif %} |
{% if conn.url == db_info.url %}
{% else %}
{% endif %}
|
{{ _('Upload an existing .db file from PyArchInit desktop or other sources. The file is validated and saved in the databases folder.') }}
{{ _('Connect to a remote PostgreSQL database or a local SQLite file. The connection is tested before being saved.') }}
{{ _('Connection credentials are stored only in session. For permanent connections, use environment variables.') }}