-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Charlito
committed
Jun 4, 2014
1 parent
f76996b
commit 60b0dbc
Showing
5 changed files
with
47 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from sqlalchemy import * | ||
from migrate import * | ||
|
||
|
||
from migrate.changeset import schema | ||
pre_meta = MetaData() | ||
post_meta = MetaData() | ||
team = Table('team', pre_meta, | ||
Column('id', INTEGER, primary_key=True, nullable=False), | ||
Column('name', VARCHAR(length=80)), | ||
Column('timezone', VARCHAR(length=40)), | ||
) | ||
|
||
|
||
def upgrade(migrate_engine): | ||
# Upgrade operations go here. Don't create your own engine; bind | ||
# migrate_engine to your metadata | ||
pre_meta.bind = migrate_engine | ||
post_meta.bind = migrate_engine | ||
pre_meta.tables['team'].drop() | ||
|
||
|
||
def downgrade(migrate_engine): | ||
# Operations to reverse the above upgrade go here. | ||
pre_meta.bind = migrate_engine | ||
post_meta.bind = migrate_engine | ||
pre_meta.tables['team'].create() |
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,6 @@ | ||
from scrim import db | ||
|
||
class Team(db.Model): | ||
id = db.Column(db.Integer, primary_key=True) | ||
name = db.Column(db.String(80)) | ||
timezone = db.Column(db.String(40)) |
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,7 @@ | ||
from flask import Blueprint | ||
|
||
mod_teams = Blueprint('mod_teams', __name__) | ||
|
||
@mod_teams.route('/') | ||
def show_teams(): | ||
return 'Sup nigger', 200 |
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