-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added popular tags window option to .ini and improved sql for pop. tags.
- Loading branch information
Neville Newey
authored and
Neville Newey
committed
May 28, 2010
1 parent
fccf771
commit 02b79e2
Showing
6 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import datetime | ||
|
||
from sqlalchemy import * | ||
from migrate import * | ||
|
||
from sqlalchemy.databases import mysql | ||
|
||
metadata = MetaData(migrate_engine) | ||
|
||
# Existing tables | ||
tag_table = Table('tag', metadata, | ||
Column('id', mysql.MSBigInteger(unsigned=True), autoincrement=True, primary_key=True, nullable=False), | ||
Column('entry_id', mysql.MSBigInteger(unsigned=True), nullable=False), | ||
Column('keyword', VARCHAR(64), server_default="", nullable=False), | ||
# The following column is the lowercased version of the tag | ||
Column('lower', VARCHAR(64), server_default="", nullable=False), | ||
Column('created', TIMESTAMP, default='current_timestamp') | ||
) | ||
|
||
def upgrade(): | ||
sql = "CREATE INDEX ix_created ON tag (created);" | ||
migrate_engine.execute(sql); | ||
|
||
|
||
def downgrade(): | ||
sql = "DROP INDEX ix_created ON tag;" | ||
migrate_engine.execute(sql); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import datetime | ||
|
||
from sqlalchemy import * | ||
from migrate import * | ||
|
||
from sqlalchemy.databases import mysql | ||
|
||
metadata = MetaData(migrate_engine) | ||
|
||
# Existing tables | ||
tag_table = Table('tag', metadata, | ||
Column('id', mysql.MSBigInteger(unsigned=True), autoincrement=True, primary_key=True, nullable=False), | ||
Column('entry_id', mysql.MSBigInteger(unsigned=True), nullable=False), | ||
Column('keyword', VARCHAR(64), server_default="", nullable=False), | ||
# The following column is the lowercased version of the tag | ||
Column('lower', VARCHAR(64), server_default="", nullable=False), | ||
Column('created', TIMESTAMP, default='current_timestamp') | ||
) | ||
|
||
def upgrade(): | ||
sql = "CREATE INDEX ix_lower ON tag (lower);" | ||
migrate_engine.execute(sql); | ||
|
||
|
||
def downgrade(): | ||
sql = "DROP INDEX ix_lower ON tag;" | ||
migrate_engine.execute(sql); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters