baf63a21556905a6c27516a8d5641d31120d1fe3 — Kridsada Thanabulpong a month ago
Add scope column to banwords.
M fanboi2/models/banword.py => fanboi2/models/banword.py +1 -0
@@ 11,6 11,7 @@ __tablename__ = "banword"
  
      id = Column(Integer, primary_key=True)
+     scope = Column(String)
      created_at = Column(DateTime(timezone=True), default=func.now())
      updated_at = Column(DateTime(timezone=True), onupdate=func.now())
      expr = Column(String, nullable=False)

A migration/versions/06000cefb0bb_add_scope_column_to_banword.py => migration/versions/06000cefb0bb_add_scope_column_to_banword.py +20 -0
@@ 0,0 1,20 @@
+ """add scope column to banword
+ 
+ Revision ID: 06000cefb0bb
+ Revises: 47c309ddc2b9
+ Create Date: 2018-12-23 11:25:44.866557
+ """
+ from alembic import op
+ import sqlalchemy as sa
+ 
+ 
+ revision = "06000cefb0bb"
+ down_revision = "47c309ddc2b9"
+ 
+ 
+ def upgrade():
+     op.add_column("banword", sa.Column("scope", sa.String))
+ 
+ 
+ def downgrade():
+     op.drop_column("banword", "scope")