aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/migrations
diff options
context:
space:
mode:
authorLucas Verney <phyks@phyks.me>2018-12-25 16:50:14 +0100
committerAlexis Metaireau <alexis@notmyidea.org>2018-12-25 16:50:14 +0100
commit0428cf06b50203432cb39bde95e450a481392797 (patch)
tree0af70aa16da50a850eeb4fd15fbb46c0bcf59955 /ihatemoney/migrations
parent0f2a5e9255034e4e4f93922c8178e166c9ef41a3 (diff)
downloadihatemoney-mirror-0428cf06b50203432cb39bde95e450a481392797.zip
ihatemoney-mirror-0428cf06b50203432cb39bde95e450a481392797.tar.gz
ihatemoney-mirror-0428cf06b50203432cb39bde95e450a481392797.tar.bz2
Add bill.creation_date field (#327)
Diffstat (limited to 'ihatemoney/migrations')
-rw-r--r--ihatemoney/migrations/alembic.ini1
-rw-r--r--ihatemoney/migrations/versions/afbf27e6ef20_add_bill_import_date_field.py26
2 files changed, 27 insertions, 0 deletions
diff --git a/ihatemoney/migrations/alembic.ini b/ihatemoney/migrations/alembic.ini
index f8ed480..5301449 100644
--- a/ihatemoney/migrations/alembic.ini
+++ b/ihatemoney/migrations/alembic.ini
@@ -7,6 +7,7 @@
# set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate
# revision_environment = false
+script_location = .
# Logging configuration
diff --git a/ihatemoney/migrations/versions/afbf27e6ef20_add_bill_import_date_field.py b/ihatemoney/migrations/versions/afbf27e6ef20_add_bill_import_date_field.py
new file mode 100644
index 0000000..4179155
--- /dev/null
+++ b/ihatemoney/migrations/versions/afbf27e6ef20_add_bill_import_date_field.py
@@ -0,0 +1,26 @@
+"""add bill.import_date field
+
+Revision ID: afbf27e6ef20
+Revises: b78f8a8bdb16
+Create Date: 2018-02-19 20:29:26.286136
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = 'afbf27e6ef20'
+down_revision = 'b78f8a8bdb16'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+ ### commands auto generated by Alembic - please adjust! ###
+ op.add_column('bill', sa.Column('creation_date', sa.Date(), nullable=True))
+ ### end Alembic commands ###
+
+
+def downgrade():
+ ### commands auto generated by Alembic - please adjust! ###
+ op.drop_column('bill', 'creation_date')
+ ### end Alembic commands ###