Changeset - 7f71d22a1794
[Not reviewed]
default
0 2 0
Marcin Kuzminski - 12 years ago 2013-06-11 13:51:23
marcin@python-works.com
Fixed issues with how mysql handles float values. Caused gists with
expiration dates not work properly on mysql.
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/__init__.py
Show inline comments
 
@@ -17,25 +17,25 @@
 
# (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/>.
 
import sys
 
import platform
 

	
 
VERSION = (1, 7, 0)
 
VERSION = (1, 7, 1)
 
BACKENDS = {
 
    'hg': 'Mercurial repository',
 
    'git': 'Git repository',
 
}
 

	
 
CELERY_ON = False
 
CELERY_EAGER = False
 

	
 
# link to config for pylons
 
CONFIG = {}
 

	
 
# Linked module for extensions
rhodecode/model/db.py
Show inline comments
 
@@ -2137,25 +2137,25 @@ class Gist(Base, BaseModel):
 
        Index('g_gist_access_id_idx', 'gist_access_id'),
 
        Index('g_created_on_idx', 'created_on'),
 
        {'extend_existing': True, 'mysql_engine': 'InnoDB',
 
         'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
 
    )
 
    GIST_PUBLIC = u'public'
 
    GIST_PRIVATE = u'private'
 

	
 
    gist_id = Column('gist_id', Integer(), primary_key=True)
 
    gist_access_id = Column('gist_access_id', Unicode(250))
 
    gist_description = Column('gist_description', UnicodeText(1024))
 
    gist_owner = Column('user_id', Integer(), ForeignKey('users.user_id'), nullable=True)
 
    gist_expires = Column('gist_expires', Float(), nullable=False)
 
    gist_expires = Column('gist_expires', Float(53), nullable=False)
 
    gist_type = Column('gist_type', Unicode(128), nullable=False)
 
    created_on = Column('created_on', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
 
    modified_at = Column('modified_at', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
 

	
 
    owner = relationship('User')
 

	
 
    @classmethod
 
    def get_or_404(cls, id_):
 
        res = cls.query().filter(cls.gist_access_id == id_).scalar()
 
        if not res:
 
            raise HTTPNotFound
 
        return res
0 comments (0 inline, 0 general)