Files
@ dc4644865e8b
Branch filter:
Location: kallithea/rhodecode/lib/dbmigrate/versions/__init__.py - annotation
dc4644865e8b
1.6 KiB
text/x-python
Implemented simple gist functionality ref #530.
- creation of public/private gists with given lifetime
- rhodecode-gist CLI for quick gist creation
- creation of public/private gists with given lifetime
- rhodecode-gist CLI for quick gist creation
9753e0907827 9753e0907827 9753e0907827 9753e0907827 9753e0907827 9753e0907827 6832ef664673 9753e0907827 9753e0907827 89efedac4e6c 9753e0907827 9753e0907827 a671db5bdd58 a671db5bdd58 a671db5bdd58 a671db5bdd58 6832ef664673 9753e0907827 9753e0907827 9753e0907827 9753e0907827 6832ef664673 9753e0907827 a671db5bdd58 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 b31984972e95 | # -*- coding: utf-8 -*-
"""
rhodecode.lib.dbmigrate.versions.__init__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Package containing new versions of database models
:created_on: Dec 11, 2010
:author: marcink
:copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com>
:license: GPLv3, see COPYING for more details.
"""
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from sqlalchemy import *
from sqlalchemy.exc import DatabaseError
from sqlalchemy.orm import relation, backref, class_mapper, joinedload
from sqlalchemy.orm.session import Session
from sqlalchemy.ext.declarative import declarative_base
from rhodecode.lib.dbmigrate.migrate import *
from rhodecode.lib.dbmigrate.migrate.changeset import *
from rhodecode.model.meta import Base
from rhodecode.model import meta
def _reset_base(migrate_engine):
## RESET COMPLETLY THE metadata for sqlalchemy to use previous declared Base
Base = declarative_base()
Base.metadata.clear()
Base.metadata = MetaData()
Base.metadata.bind = migrate_engine
meta.Base = Base
|