docs(database): update configuration guides with wizard cross-references, clean up review feedback
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -10,7 +10,7 @@ Configuration is primarily done through environment variables specified in a `.e
|
||||
|
||||
| **Variable** | **Description** | **Example** |
|
||||
|------------------------|----------------------------------------------------------|--------------------------------|
|
||||
| `DATABASE_URL` | Path/URL to the SQLite database (or other SQL backend). | `sqlite:///./app/database.db` |
|
||||
| `DATABASE_URL` | Path/URL to the SQLite database (or other SQL backend). Use the [Database Wizard](/database-wizard) for guided setup. See [Database Configuration](DatabaseConfiguration.md). | `sqlite:///./app/database.db` |
|
||||
| `REDIS_URL` | URL for Redis, used by Celery for broker & result store. | `redis://redis:6379/0` |
|
||||
| `WORKDIR` | Working directory for the application. | `/workdir` |
|
||||
| `GOTENBERG_URL` | Gotenberg PDF processing URL. | `http://gotenberg:3000` |
|
||||
|
||||
@@ -25,7 +25,7 @@ DocuElevate includes a guided **Database Configuration Wizard** accessible at `/
|
||||
|
||||
### How to Access
|
||||
|
||||
Navigate to **`/database-wizard`** in your browser, or find the link under **Admin → Settings**.
|
||||
Navigate to **`/database-wizard`** in your browser, or find the link under **Admin → Settings**. On the Settings page, click the **DB Wizard** button in the toolbar, or look for the **Open Database Wizard** link next to the `database_url` setting.
|
||||
|
||||
### Wizard Steps
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
</div>
|
||||
|
||||
<div class="p-4 border rounded-lg bg-gray-50">
|
||||
<label for="env_snippet" id="env_snippet_label" class="block text-sm font-medium text-gray-700 mb-2">
|
||||
<label for="env_snippet" class="block text-sm font-medium text-gray-700 mb-2">
|
||||
Copy this into your <code>.env</code> file:
|
||||
</label>
|
||||
<div class="flex items-center">
|
||||
|
||||
@@ -307,23 +307,6 @@ class TestMigrateData:
|
||||
with patch("app.utils.db_migrate._make_engine") as mock_make:
|
||||
mock_make.side_effect = [real_src, real_tgt]
|
||||
with patch("app.utils.db_migrate._stamp_alembic_head"):
|
||||
# Patch MetaData to return None for target table lookup
|
||||
original_metadata = __import__("sqlalchemy", fromlist=["MetaData"]).MetaData
|
||||
|
||||
class MockTargetMeta(original_metadata):
|
||||
"""MetaData subclass that hides target tables after reflect."""
|
||||
|
||||
_reflect_count = 0
|
||||
|
||||
def reflect(self, *args, **kwargs):
|
||||
MockTargetMeta._reflect_count += 1
|
||||
if MockTargetMeta._reflect_count > 1:
|
||||
# After source reflect, make target reflect succeed but return empty
|
||||
return
|
||||
super().reflect(*args, **kwargs)
|
||||
|
||||
# This is complex, so let's use a simpler mock approach
|
||||
# We'll just verify the error path catches errors from reflect
|
||||
result = migrate_data("sqlite:///:memory:", "sqlite:///:memory:")
|
||||
|
||||
# With schema in target, migration should succeed normally
|
||||
|
||||
Reference in New Issue
Block a user