from mediagoblin.init import setup_global_and_app_config, setup_database
from mediagoblin.db.mongo.util import ObjectId
-from mediagoblin.db.sql.models import (Base, User, MediaEntry, MediaComment,
+from mediagoblin.db.sql.base import Base, Session
+from mediagoblin.db.sql.models import (User, MediaEntry, MediaComment,
Tag, MediaTag, MediaFile, MediaAttachmentFile, MigrationData)
from mediagoblin.media_types.image.models import ImageData
from mediagoblin.media_types.video.models import VideoData
sql_connect
from mediagoblin.db.mongo.open import setup_connection_and_db_from_config as \
mongo_connect
-from mediagoblin.db.sql.base import Session
obj_id_table = dict()
from sqlalchemy import create_engine
import logging
-from mediagoblin.db.sql.base import Session
-from mediagoblin.db.sql.models import Base
+from mediagoblin.db.sql.base import Base, Session
class DatabaseMaster(object):
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from mediagoblin.db.sql.models import Base
+from mediagoblin.db.sql.base import Base
from sqlalchemy import (
Column, Integer, Unicode, UnicodeText, DateTime, Boolean, ForeignKey,
-from mediagoblin.db.sql.models import Base
+from mediagoblin.db.sql.base import Base
from sqlalchemy import (
Column, Integer, Float, ForeignKey)
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from mediagoblin.db.sql.models import Base
+from mediagoblin.db.sql.base import Base
from sqlalchemy import (
Column, Integer, SmallInteger, ForeignKey)