Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:58:22

0001 #!/usr/bin/env python
0002 #
0003 # Licensed under the Apache License, Version 2.0 (the "License");
0004 # You may not use this file except in compliance with the License.
0005 # You may obtain a copy of the License at
0006 # http://www.apache.org/licenses/LICENSE-2.0OA
0007 #
0008 # Authors:
0009 # - Wen Guan, <wen.guan@cern.ch>, 2021 - 2022
0010 
0011 import argparse
0012 import sys
0013 import os.path
0014 base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
0015 sys.path.append(base_path)
0016 os.chdir(base_path)
0017 
0018 from idds.orm.base.utils import destroy_database, destroy_everything      # noqa E402
0019 
0020 
0021 if __name__ == '__main__':
0022     parser = argparse.ArgumentParser()
0023     parser.add_argument("--destroy-everything", action="store_true", default=False, help='Destroy all tables+constraints')
0024     args = parser.parse_args()
0025     if args.destroy_everything:
0026         destroy_everything()
0027     else:
0028         destroy_database()