[FEAT] add timestamp on register (#15)

* add timestamp on register
This commit is contained in:
Tiago Vasconcelos 2023-08-18 07:17:29 +01:00 committed by GitHub
parent 4586164016
commit c8b31d8e3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 33 additions and 15 deletions

View file

@ -1,5 +1,4 @@
async def m001_initial(db):
await db.execute(
"""
CREATE TABLE events.events (
@ -38,7 +37,6 @@ async def m001_initial(db):
async def m002_changed(db):
await db.execute(
"""
CREATE TABLE events.ticket (
@ -81,3 +79,12 @@ async def m002_changed(db):
(row[0], row[1], row[2], row[3], row[4], row[5], True),
)
await db.execute("DROP TABLE events.tickets")
async def m003_add_register_timestamp(db):
"""
Add a column to register the timestamp of ticket register
"""
await db.execute(
"ALTER TABLE events.ticket ADD COLUMN reg_timestamp TIMESTAMP;"
) # NULL means not registered, or old ticket