mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-12 18:15:40 +00:00
Migrate "mysql" and "postgresql" targets
This commit is contained in:
24
tasks.py
24
tasks.py
@ -199,4 +199,26 @@ def coverage(c):
|
||||
))
|
||||
|
||||
# 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')
|
||||
|
Reference in New Issue
Block a user