mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Migrate "mysql" and "postgresql" targets
This commit is contained in:
parent
af50e29e2c
commit
f5fd0fc5be
12
Makefile
12
Makefile
@ -10,17 +10,7 @@ clean:
|
|||||||
# Create a superuser account
|
# Create a superuser account
|
||||||
superuser:
|
superuser:
|
||||||
cd InvenTree && python3 manage.py createsuperuser
|
cd InvenTree && python3 manage.py createsuperuser
|
||||||
|
|
||||||
# Install pre-requisites for mysql setup
|
|
||||||
mysql:
|
|
||||||
sudo apt-get install mysql-server libmysqlclient-dev
|
|
||||||
pip3 install mysqlclient
|
|
||||||
|
|
||||||
# Install pre-requisites for postgresql setup
|
|
||||||
postgresql:
|
|
||||||
sudo apt-get install postgresql postgresql-contrib libpq-dev
|
|
||||||
pip3 install psycopg2
|
|
||||||
|
|
||||||
# Install packages required to generate code docs
|
# Install packages required to generate code docs
|
||||||
docreqs:
|
docreqs:
|
||||||
pip3 install -U -r docs/requirements.txt
|
pip3 install -U -r docs/requirements.txt
|
||||||
|
24
tasks.py
24
tasks.py
@ -199,4 +199,26 @@ def coverage(c):
|
|||||||
))
|
))
|
||||||
|
|
||||||
# Generate coverage report
|
# Generate coverage report
|
||||||
c.run('coverage html')
|
c.run('coverage html')
|
||||||
|
|
||||||
|
@task
|
||||||
|
def mysql(c):
|
||||||
|
"""
|
||||||
|
Install packages required for using InvenTree with a MySQL database.
|
||||||
|
"""
|
||||||
|
|
||||||
|
print('Installing packages required for MySQL')
|
||||||
|
|
||||||
|
c.run('sudo apt-get install mysql-server libmysqlclient-dev')
|
||||||
|
c.run('pip3 install mysqlclient')
|
||||||
|
|
||||||
|
@task
|
||||||
|
def postgresql(c):
|
||||||
|
"""
|
||||||
|
Install packages required for using InvenTree with a PostgreSQL database
|
||||||
|
"""
|
||||||
|
|
||||||
|
print("Installing packages required for PostgreSQL")
|
||||||
|
|
||||||
|
c.run('sudo apt-get install postgresql postgresql-contrib libpq-dev')
|
||||||
|
c.run('pip3 install psycopg2')
|
||||||
|
Loading…
Reference in New Issue
Block a user