1import datetime
2import os
3
4SQL_SCRIPTS_DIR = "tools/migrations"
5
6
7def create_filenames():
8  for ftype in ("upgrade", "downgrade"):
9    yield "%s/%s_%s.sql" % (
10      SQL_SCRIPTS_DIR,
11      datetime.datetime.utcnow().strftime("%Y_%m_%d__%H_%M_%S"),
12      ftype,
13    )
14
15
16def touch_files(fnames):
17  for fname in fnames:
18    print "Creating file %s" % fname
19    os.system("touch %s" % fname)
20
21
22if __name__ == "__main__":
23  touch_files(
24    create_filenames(),
25  )
26