Update fabfile to user global environment configuration, abstracted tasks for platform, webserver and database manager
This commit is contained in:
18
fabfile/databases/mysql.py
Normal file
18
fabfile/databases/mysql.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from fabric.api import run, sudo, cd, env, task
|
||||
|
||||
|
||||
def create_database():
|
||||
"""
|
||||
Create the MySQL Mayan EDMS database
|
||||
"""
|
||||
run('echo "create database %(database_name)s;" | mysql -u root --password=%(database_manager_admin_password)s' % env)
|
||||
#TODO: create DB and mayan user
|
||||
#TODO: custom settings_local
|
||||
|
||||
|
||||
def drop_database():
|
||||
"""
|
||||
Drop MySQL's Mayan EDMS's database
|
||||
"""
|
||||
run('echo "drop database %(database_name)s;" | mysql -u root --password=%(database_manager_admin_password)s' % env)
|
||||
|
||||
Reference in New Issue
Block a user