def insert_new_person(username, password, email): password = encoded(password) # Get current server time created_dt = strftime("%Y-%m-%d %H:%M:%S", gmtime()) sql(INSERT_PERSON_QUERY.format(username, password, email, created_dt))
def create_table_task_status_query(): sql(CREATE_TABLE_TASK_STATUS_QUERY)
def create_table_category(): sql(CREATE_TABLE_CATEGORY_QUERY)
def create_table_person(): sql(CREATE_TABLE_PERSON_QUERY)
def create_view_person(): sql(CREATE_VIEW_PERSON_QUERY)
def create_table_offer(): sql(CREATE_TABLE_OFFER_QUERY)
def create_table_task(): sql(CREATE_TABLE_TASK_QUERY)
def insert_all_categories(): for category in CATEGORIES: sql(INSERT_CATEGORY_QUERY.format(category))
def insert_all_statuses(): for status in ALLOWED_STATUSES: sql(INSERT_TASK_STATUS_QUERY.format(status))