mozilla / f1

INACTIVE - http://mzl.la/ghe-archive - F1 is a browser extension that allows you to share links in a fast and fun way. Share links from within the browser, from any webpage, using the same services you already know and love. F1 is made by Mozilla.

Home Page:http://f1.mozillamessaging.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

server code does not work with the latest migrate package

tarekziade opened this issue · comments

If you checkout and develop the current trunk, and it will pull migrate-0.6.1, which does not work with the current code.

My diff to make it work:

diff --git a/linkdrop/config/environment.py b/linkdrop/config/environment.py
index da589e6..b168db5 100644
--- a/linkdrop/config/environment.py
+++ b/linkdrop/config/environment.py
@@ -32,7 +32,8 @@ from sqlalchemy import engine_from_config
from paste.deploy.converters import asbool

from migrate.versioning.util import load_model
-from migrate.versioning import exceptions, genmodel, schemadiff, schema
+from migrate.versioning import genmodel, schemadiff, schema
+from migrate import exceptions

import linkdrop.lib.app_globals as app_globals
from linkdrop.config.routing import make_map
@@ -44,7 +45,7 @@ def load_environment(global_conf, app_conf):
object
"""

config = PylonsConfig()

  • Pylons paths

    root = os.path.dirname(os.path.dirname(os.path.abspath(file)))
    paths = dict(root=root,
    @@ -68,7 +69,7 @@ def load_environment(global_conf, app_conf):
 import linkdrop.lib.helpers as h
 config['pylons.h'] = h

    Setup cache object as early as possible

    import pylons
    pylons.cache._push_object(config['pylons.app_globals'].cache)
    @@ -95,9 +96,9 @@ def load_environment(global_conf, app_conf):
    # unmanaged upgrades
    diff = schemadiff.getDiffOfModelAgainstDatabase(
    meta.Base.metadata, engine, excludeTables=None)

  •        genmodel.ModelGenerator(diff).applyModel()
    
  •        genmodel.ModelGenerator(diff, engine).applyModel()
    

    CONFIGURATION OPTIONS HERE (note: all config options will override

    any Pylons config options)

    return config
    diff --git a/setup.py b/setup.py
    index ce859ac..384c8f6 100644
    --- a/setup.py
    +++ b/setup.py
    @@ -37,7 +37,7 @@ setup(
    url='',
    install_requires=[
    "Pylons>=1.0",

  •    "SQLAlchemy>=0.5",
    
  •    "SQLAlchemy==0.6.6",
     "docutils",
     "nose",
     "httplib2",
    

not applicable any longer, we've removed the database entirely.