start project
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"""Add human_path_stats_daily (Method A, Ch09's most-crawled-vs-visited)."""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
revision = "0004_human_path_stats"
|
||||
down_revision = "0003_referrer_and_browser_stats"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
"human_path_stats_daily",
|
||||
sa.Column("date", sa.Date, primary_key=True),
|
||||
sa.Column("path", sa.String(2048), primary_key=True),
|
||||
sa.Column("count", sa.Integer, nullable=False, server_default="0"),
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_table("human_path_stats_daily")
|
||||
Reference in New Issue
Block a user