#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Update from version 7 to version 8 of Yokadi DB
Drops the projectkeyword table, since we are removing this feature.

@author: Aurélien Gâteau <mail@agateau.com>
@license: GPL v3 or newer
"""
import sys

from sqlalchemy import create_engine


def dropProjectKeywordTable(conn):
    conn.execute('drop table project_keyword')


def main():
    uri = 'sqlite:///' + sys.argv[1]
    engine = create_engine(uri)
    with engine.begin() as conn:
        dropProjectKeywordTable(conn)


if __name__ == "__main__":
    main()
# vi: ts=4 sw=4 et
