/usr/share/yokadi/update/update2to3 is in yokadi 0.14.0-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #! /usr/bin/python
# -*- coding: UTF-8 -*-
"""
Update from version 2 to version 3 of Yokadi DB
@author: Sébastien Renard <Sebastien.Renard@digitalfox.org>
@license: GPL v3 or newer
"""
import sys
from os.path import dirname, join
from sqlobject import connectionForURI, RelatedJoin, sqlhub, SQLObject
""" This is a fake table (we only need table name) """
class Project(SQLObject):
pass
def alterProjectTable():
Project.sqlmeta.addJoin(RelatedJoin("Keyword",
createRelatedTable=False,
intermediateTable="project_keyword",
joinColumn="project_id",
otherColumn="keyword_id"))
def main():
sqlhub.processConnection = connectionForURI('sqlite:' + sys.argv[1])
alterProjectTable()
if __name__ == "__main__":
main()
# vi: ts=4 sw=4 et
|