mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
split maintenance tasks into bare metal / docker
This commit is contained in:
parent
cbe6c821cc
commit
98efb9f887
@ -4,9 +4,33 @@ Auto Groups allows you to automatically place users of certain states into corp
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
This is an optional app that needs to be installed.
|
- Add `'allianceauth.eveonline.autogroups',` to `INSTALLED_APPS` in your `local.py`
|
||||||
|
|
||||||
To install this app add `'allianceauth.eveonline.autogroups',` to your `INSTALLED_APPS` list and run migrations. All other settings are controlled via the admin panel under the `Eve_Autogroups` section.
|
Perform Django Maintenance and restart our Web Service and Workers.
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python manage.py migrate
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
supervisorctl restart myauth:
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose --env-file=.env up -d
|
||||||
|
docker compose exec allianceauth_gunicorn bash
|
||||||
|
auth migrate
|
||||||
|
auth collectstatic
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
|
All other settings are controlled via the admin panel under the `Eve_Autogroups` section.
|
||||||
|
|
||||||
## Configuring a group
|
## Configuring a group
|
||||||
|
|
||||||
|
@ -8,7 +8,31 @@ This module is used to check the registration status of Corp members and to dete
|
|||||||
|
|
||||||
Corp Stats requires access to the `esi-corporations.read_corporation_membership.v1` SSO scope. Update your application on the [EVE Developers site](https://developers.eveonline.com) to ensure it is available.
|
Corp Stats requires access to the `esi-corporations.read_corporation_membership.v1` SSO scope. Update your application on the [EVE Developers site](https://developers.eveonline.com) to ensure it is available.
|
||||||
|
|
||||||
Add `'allianceauth.corputils',` to your `INSTALLED_APPS` list in your auth project's settings file. Run migrations to complete installation.
|
- Add `'allianceauth.corputils',` to `INSTALLED_APPS` in your `local.py`
|
||||||
|
|
||||||
|
Perform Django Maintenance and restart our Web Service and Workers.
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python manage.py migrate
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
supervisorctl restart myauth:
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose --env-file=.env up -d
|
||||||
|
docker compose exec allianceauth_gunicorn bash
|
||||||
|
auth migrate
|
||||||
|
auth collectstatic
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
## Creating a Corp Stats
|
## Creating a Corp Stats
|
||||||
|
|
||||||
|
@ -8,7 +8,31 @@ The Fleet Activity Tracking (FAT) app allows you to track fleet participation.
|
|||||||
|
|
||||||
Fleet Activity Tracking requires access to the `esi-location.read_location.v1`, `esi-location.read_ship_type.v1`, and `esi-universe.read_structures.v1` SSO scopes. Update your application on the [EVE Developers site](https://developers.eveonline.com) to ensure these are available.
|
Fleet Activity Tracking requires access to the `esi-location.read_location.v1`, `esi-location.read_ship_type.v1`, and `esi-universe.read_structures.v1` SSO scopes. Update your application on the [EVE Developers site](https://developers.eveonline.com) to ensure these are available.
|
||||||
|
|
||||||
Add `'allianceauth.fleetactivitytracking',` to your `INSTALLED_APPS` list in your auth project's settings file. Run migrations to complete installation.
|
Add `'allianceauth.fleetactivitytracking',` to `INSTALLED_APPS` in your `local.py`
|
||||||
|
|
||||||
|
Perform Django Maintenance and restart our Web Service and Workers.
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python manage.py migrate
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
supervisorctl restart myauth:
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose --env-file=.env up -d
|
||||||
|
docker compose exec allianceauth_gunicorn bash
|
||||||
|
auth migrate
|
||||||
|
auth collectstatic
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
## Permissions
|
## Permissions
|
||||||
|
|
||||||
|
@ -10,7 +10,31 @@ This app allows you to manage applications for multiple corporations in your all
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Add `'allianceauth.hrapplications',` to your `INSTALLED_APPS` list in your auth project's settings file. Run migrations to complete installation.
|
- Add `'allianceauth.hrapplications',` to `INSTALLED_APPS` in your `local.py`
|
||||||
|
|
||||||
|
Perform Django Maintenance and restart our Web Service and Workers.
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python manage.py migrate
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
supervisorctl restart myauth:
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose --env-file=.env up -d
|
||||||
|
docker compose exec allianceauth_gunicorn bash
|
||||||
|
auth migrate
|
||||||
|
auth collectstatic
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
## Management
|
## Management
|
||||||
|
|
||||||
|
@ -6,7 +6,31 @@ Fleet Operations is an app for organizing and communicating fleet schedules.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Add `'allianceauth.optimer',` to your `INSTALLED_APPS` list in your auth project's settings file. Run migrations to complete installation.
|
- Add `'allianceauth.optimer',` to `INSTALLED_APPS` in your `local.py`
|
||||||
|
|
||||||
|
Perform Django Maintenance and restart our Web Service and Workers.
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python manage.py migrate
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
supervisorctl restart myauth:
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose --env-file=.env up -d
|
||||||
|
docker compose exec allianceauth_gunicorn bash
|
||||||
|
auth migrate
|
||||||
|
auth collectstatic
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
## Permissions
|
## Permissions
|
||||||
|
|
||||||
|
@ -2,9 +2,33 @@
|
|||||||
|
|
||||||
Access to most of Alliance Auth's features is controlled by Django's permissions system. To help you secure your services, Alliance Auth provides a permission auditing tool.
|
Access to most of Alliance Auth's features is controlled by Django's permissions system. To help you secure your services, Alliance Auth provides a permission auditing tool.
|
||||||
|
|
||||||
This is an optional app that needs to be installed.
|
## Installation
|
||||||
|
|
||||||
To install it add `'allianceauth.permissions_tool',` to your `INSTALLED_APPS` list in your auth project's settings file.
|
- Add `'allianceauth.permissions_tool',` to `INSTALLED_APPS` in your `local.py`
|
||||||
|
|
||||||
|
Perform Django Maintenance and restart our Web Service and Workers.
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python manage.py migrate
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
supervisorctl restart myauth:
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose --env-file=.env up -d
|
||||||
|
docker compose exec allianceauth_gunicorn bash
|
||||||
|
auth migrate
|
||||||
|
auth collectstatic
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@ -6,7 +6,31 @@ Ship Replacement helps you to organize ship replacement programs (SRP) for your
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Add `'allianceauth.srp',` to your `INSTALLED_APPS` list in your auth project's settings file. Run migrations to complete installation.
|
- Add `'allianceauth.srp',` to `INSTALLED_APPS` in your `local.py`
|
||||||
|
|
||||||
|
Perform Django Maintenance and restart our Web Service and Workers.
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python manage.py migrate
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
supervisorctl restart myauth:
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose --env-file=.env up -d
|
||||||
|
docker compose exec allianceauth_gunicorn bash
|
||||||
|
auth migrate
|
||||||
|
auth collectstatic
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
## Permissions
|
## Permissions
|
||||||
|
|
||||||
|
@ -6,7 +6,31 @@ Structure Timers helps you keep track of both offensive and defensive structure
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Add `'allianceauth.timerboard',` to your `INSTALLED_APPS` list in your auth project's settings file. Run migrations to complete installation.
|
- Add `'allianceauth.timerboard',` to `INSTALLED_APPS` in your `local.py`
|
||||||
|
|
||||||
|
Perform Django Maintenance and restart our Web Service and Workers.
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python manage.py migrate
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
supervisorctl restart myauth:
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose --env-file=.env up -d
|
||||||
|
docker compose exec allianceauth_gunicorn bash
|
||||||
|
auth migrate
|
||||||
|
auth collectstatic
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
## Permissions
|
## Permissions
|
||||||
|
|
||||||
|
@ -6,13 +6,13 @@ Discord is a web-based instant messaging client with voice. Kind of like TeamSpe
|
|||||||
|
|
||||||
Discord is very popular amongst ad-hoc small groups and larger organizations seeking a modern technology. Alternative voice communications should be investigated for larger than small-medium groups for more advanced features.
|
Discord is very popular amongst ad-hoc small groups and larger organizations seeking a modern technology. Alternative voice communications should be investigated for larger than small-medium groups for more advanced features.
|
||||||
|
|
||||||
## Setup
|
## Setup Auth
|
||||||
|
|
||||||
### Prepare Your Settings File
|
### Prepare Your Settings File
|
||||||
|
|
||||||
Make the following changes in your auth project's settings file (`local.py`):
|
Make the following changes in your auth project's settings file (`local.py`):
|
||||||
|
|
||||||
- Add `'allianceauth.services.modules.discord',` to `INSTALLED_APPS`
|
- Add `'allianceauth.services.modules.discord',` to `INSTALLED_APPS` in your `local.py`
|
||||||
- Append the following to the bottom of the settings file:
|
- Append the following to the bottom of the settings file:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
@ -37,6 +37,34 @@ CELERYBEAT_SCHEDULE['discord.update_all_usernames'] = {
|
|||||||
You will have to add most of the values for these settings, e.g., your Discord server ID (aka guild ID), later in the setup process.
|
You will have to add most of the values for these settings, e.g., your Discord server ID (aka guild ID), later in the setup process.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
### Preparing Auth
|
||||||
|
|
||||||
|
Before continuing, it is essential to perform Django Maintenance and restart our Web Service and Workers.
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python manage.py migrate
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
supervisorctl restart myauth:
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose --env-file=.env up -d
|
||||||
|
docker compose exec allianceauth_gunicorn bash
|
||||||
|
auth migrate
|
||||||
|
auth collectstatic
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
|
## Setup Discord
|
||||||
|
|
||||||
### Creating a Server
|
### Creating a Server
|
||||||
|
|
||||||
Navigate to the [Discord site](https://discord.com/) and register an account, or log in if you have one already.
|
Navigate to the [Discord site](https://discord.com/) and register an account, or log in if you have one already.
|
||||||
@ -67,10 +95,6 @@ Update your auth project's settings file with these pieces of information from t
|
|||||||
- From the OAuth2 > General panel, `DISCORD_APP_SECRET` is the Client Secret
|
- From the OAuth2 > General panel, `DISCORD_APP_SECRET` is the Client Secret
|
||||||
- From the Bot panel, `DISCORD_BOT_TOKEN` is the Token
|
- From the Bot panel, `DISCORD_BOT_TOKEN` is the Token
|
||||||
|
|
||||||
### Preparing Auth
|
|
||||||
|
|
||||||
Before continuing, it is essential to run migrations and restart Gunicorn and Celery.
|
|
||||||
|
|
||||||
### Adding a Bot to the Server
|
### Adding a Bot to the Server
|
||||||
|
|
||||||
Once created, navigate to the "Services" page of your Alliance Auth install as the superuser account. At the top there is a big green button labeled "Link Discord Server". Click it, then from the drop-down select the server you created, and then Authorize.
|
Once created, navigate to the "Services" page of your Alliance Auth install as the superuser account. At the top there is a big green button labeled "Link Discord Server". Click it, then from the drop-down select the server you created, and then Authorize.
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
# Discourse
|
# Discourse
|
||||||
|
|
||||||
## Prepare Your Settings
|
## Setup Auth
|
||||||
|
|
||||||
|
### Prepare Your Settings File
|
||||||
|
|
||||||
In your auth project's settings file, do the following:
|
In your auth project's settings file, do the following:
|
||||||
|
|
||||||
- Add `'allianceauth.services.modules.discourse',` to your `INSTALLED_APPS` list
|
- Add `'allianceauth.services.modules.discourse',` to `INSTALLED_APPS` in your `local.py`
|
||||||
- Append the following to your local.py settings file:
|
- Append the following to your `local.py` settings file:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# Discourse Configuration
|
# Discourse Configuration
|
||||||
@ -15,6 +17,32 @@ DISCOURSE_API_KEY = ''
|
|||||||
DISCOURSE_SSO_SECRET = ''
|
DISCOURSE_SSO_SECRET = ''
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Preparing Auth
|
||||||
|
|
||||||
|
Before continuing, it is essential to perform Django Maintenance and restart our Web Service and Workers.
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python manage.py migrate
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
supervisorctl restart myauth:
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose --env-file=.env up -d
|
||||||
|
docker compose exec allianceauth_gunicorn bash
|
||||||
|
auth migrate
|
||||||
|
auth collectstatic
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
## Install Docker
|
## Install Docker
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
@ -4,12 +4,14 @@
|
|||||||
|
|
||||||
[XenForo](https://xenforo.com/) is a popular, paid forum. This guide will assume that you already have XenForo installed with a valid license (please keep in mind that XenForo is not free nor open-source, therefore, you need to purchase a license first). If you come across any problems related with the installation of XenForo please contact their support service.
|
[XenForo](https://xenforo.com/) is a popular, paid forum. This guide will assume that you already have XenForo installed with a valid license (please keep in mind that XenForo is not free nor open-source, therefore, you need to purchase a license first). If you come across any problems related with the installation of XenForo please contact their support service.
|
||||||
|
|
||||||
## Prepare Your Settings
|
## Setup Auth
|
||||||
|
|
||||||
|
### Prepare Your Settings
|
||||||
|
|
||||||
In your auth project's settings file, do the following:
|
In your auth project's settings file, do the following:
|
||||||
|
|
||||||
- Add `'allianceauth.services.modules.xenforo',` to your `INSTALLED_APPS` list
|
- Add `'allianceauth.services.modules.xenforo',` to `INSTALLED_APPS` in your `local.py`
|
||||||
- Append the following to your local.py settings file:
|
- Append the following to your `local.py` settings file:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# XenForo Configuration
|
# XenForo Configuration
|
||||||
@ -18,6 +20,32 @@ XENFORO_DEFAULT_GROUP = 0
|
|||||||
XENFORO_APIKEY = 'yourapikey'
|
XENFORO_APIKEY = 'yourapikey'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Preparing Auth
|
||||||
|
|
||||||
|
Before continuing, it is essential to perform Django Maintenance and restart our Web Service and Workers.
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python manage.py migrate
|
||||||
|
python manage.py collectstatic --noinput
|
||||||
|
supervisorctl restart myauth:
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose --env-file=.env up -d
|
||||||
|
docker compose exec allianceauth_gunicorn bash
|
||||||
|
auth migrate
|
||||||
|
auth collectstatic
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
## XenAPI
|
## XenAPI
|
||||||
|
|
||||||
By default, XenForo does not support any kind of API, however, there is a third-party package called [XenAPI](https://github.com/Contex/XenAPI) which provides a simple REST interface by which we can access XenForo's functions to create and edit users.
|
By default, XenForo does not support any kind of API, however, there is a third-party package called [XenAPI](https://github.com/Contex/XenAPI) which provides a simple REST interface by which we can access XenForo's functions to create and edit users.
|
||||||
|
@ -4,10 +4,25 @@
|
|||||||
|
|
||||||
Your auth project is just a regular Django project - you can add in [other Django apps](https://djangopackages.org/) as desired. Most come with dedicated setup guides, but here is the general procedure:
|
Your auth project is just a regular Django project - you can add in [other Django apps](https://djangopackages.org/) as desired. Most come with dedicated setup guides, but here is the general procedure:
|
||||||
|
|
||||||
1. add `'appname',` to your `INSTALLED_APPS` setting in `local.py`
|
::::{tabs}
|
||||||
2. run `python manage.py migrate`
|
:::{group-tab} Bare Metal
|
||||||
3. run `python manage.py collectstatic --noinput`
|
|
||||||
4. restart AA with `supervisorctl restart myauth:`
|
1. Add `'appname',` to `INSTALLED_APPS` setting in `local.py`
|
||||||
|
1. Run Migrations `python manage.py migrate`
|
||||||
|
1. Collect Static Files `python manage.py collectstatic --noinput`
|
||||||
|
1. Restart our Web Service and Workers `supervisorctl restart myauth:`
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
1. Add `'appname',` to `INSTALLED_APPS` setting in `local.py`
|
||||||
|
1. Restart our Web Service and Workers `docker compose --env-file=.env up -d`
|
||||||
|
1. Enter a Docker Container `docker compose exec allianceauth_gunicorn bash`
|
||||||
|
1. Run Migrations `auth migrate`
|
||||||
|
1. Collect Static Files `auth collectstatic`
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
## Removing Apps
|
## Removing Apps
|
||||||
|
|
||||||
@ -25,20 +40,38 @@ First, we want to remove the app related tables from the database.
|
|||||||
|
|
||||||
Let's first try the automatic approach by running the following command:
|
Let's first try the automatic approach by running the following command:
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
python manage.py migrate appname zero
|
python manage.py migrate appname zero
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose exec allianceauth_gunicorn bash
|
||||||
|
python manage.py migrate appname zero
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
If that works, you'll get a confirmation message.
|
If that works, you'll get a confirmation message.
|
||||||
|
|
||||||
If that did not work, and you got error messages, you will need to remove the tables manually. This is pretty common btw, because many apps use sophisticated table setups, which cannot be removed automatically by Django.
|
If that did not work, and you got error messages, you will need to remove the tables manually.
|
||||||
|
> This is pretty common, because many apps use sophisticated table setups, which cannot be removed automatically by Django.
|
||||||
|
|
||||||
#### Manual table removal
|
#### Manual table removal
|
||||||
|
|
||||||
|
::::{tabs}
|
||||||
|
:::{group-tab} Bare Metal
|
||||||
|
|
||||||
First, tell Django that these migrations are no longer in effect (note the additional `--fake`):
|
First, tell Django that these migrations are no longer in effect (note the additional `--fake`):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
python manage.py migrate appname zero --fake
|
python manage.py appname zero --fake
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, open the mysql tool and connect to your Alliance Auth database:
|
Then, open the mysql tool and connect to your Alliance Auth database:
|
||||||
@ -75,6 +108,53 @@ SET FOREIGN_KEY_CHECKS=1;
|
|||||||
exit;
|
exit;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
:::{group-tab} Containerized
|
||||||
|
|
||||||
|
First, tell Django that these migrations are no longer in effect (note the additional `--fake`):
|
||||||
|
|
||||||
|
```shell
|
||||||
|
auth migrate appname zero --fake
|
||||||
|
```
|
||||||
|
|
||||||
|
Here we need to swap containers, if you are still inside allianceauth_gunicorn, exit with `exit`
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose exec auth_mysql bash
|
||||||
|
sudo mysql -u root
|
||||||
|
use alliance_auth;
|
||||||
|
```
|
||||||
|
|
||||||
|
Next, disable foreign key check. This makes it much easier to drop tables in any order.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
SET FOREIGN_KEY_CHECKS=0;
|
||||||
|
```
|
||||||
|
|
||||||
|
Then get a list of all tables. All tables belonging to the app in question will start with `appname_`.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
show tables;
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, drop the tables from the app one by one like so:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
drop table appname_model_1;
|
||||||
|
drop table appname_model_2;
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
And finally, but very importantly, re-enable foreign key checks again and then exit:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
SET FOREIGN_KEY_CHECKS=1;
|
||||||
|
exit;
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
### Step 2 - Remove the app from Alliance Auth
|
### Step 2 - Remove the app from Alliance Auth
|
||||||
|
|
||||||
Once the tables have been removed, you can remove the app from Alliance Auth. This is done by removing the applabel from the `INSTALLED_APPS` list in your local settings file.
|
Once the tables have been removed, you can remove the app from Alliance Auth. This is done by removing the applabel from the `INSTALLED_APPS` list in your local settings file.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user