This should get us back on track (tested on ARCH Linux)
This commit is contained in:
@@ -23,16 +23,19 @@ class RecipeController:
|
||||
self.items_controller = registry.get_instance("items_controller")
|
||||
self.command_alias_service = registry.get_instance("command_alias_service")
|
||||
|
||||
def pre_start(self):
|
||||
self.db.shared.exec("CREATE TABLE IF NOT EXISTS recipe ("
|
||||
"id INT NOT NULL PRIMARY KEY, "
|
||||
"name VARCHAR(50) NOT NULL, "
|
||||
"author VARCHAR(50) NOT NULL, "
|
||||
"recipe TEXT NOT NULL, "
|
||||
"dt INT NOT NULL DEFAULT 0)")
|
||||
|
||||
def start(self):
|
||||
self.command_alias_service.add_alias("r", "recipe")
|
||||
self.command_alias_service.add_alias("tradeskill", "recipe")
|
||||
|
||||
self.db.exec("CREATE TABLE IF NOT EXISTS recipe ("
|
||||
"id INT NOT NULL PRIMARY KEY, "
|
||||
"name VARCHAR(50) NOT NULL, "
|
||||
"author VARCHAR(50) NOT NULL, "
|
||||
"recipe TEXT NOT NULL, "
|
||||
"dt INT NOT NULL DEFAULT 0)")
|
||||
|
||||
self.db.create_view("recipe")
|
||||
recipe_dir = os.path.dirname(os.path.realpath(__file__)) + "/recipes/"
|
||||
recipes = self.db.query("SELECT id, dt FROM recipe")
|
||||
|
||||
Reference in New Issue
Block a user