| Conditions | 1 |
| Total Lines | 23 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | #This file create a SQLite local database for CNBP requirement. |
||
| 10 | def create_localDB_CNBP(Path): |
||
| 11 | |||
| 12 | # name of the TableName to be created |
||
| 13 | |||
| 14 | |||
| 15 | #Create the PRIMARY KEY column. |
||
| 16 | |||
| 17 | |||
| 18 | load_dotenv() |
||
| 19 | |||
| 20 | username = os.getenv("LORISusername") |
||
| 21 | password = os.getenv("LORISpassword") |
||
| 22 | |||
| 23 | # Create the variable array that store the columns information to be used later in loop for column creation |
||
| 24 | TableName = LocalDB_schema.CNBP_schema_table_name |
||
| 25 | KeyField = LocalDB_schema.CNBP_schema_keyfield |
||
| 26 | NewColumns = LocalDB_schema.CNBP_schema_fields |
||
| 27 | NewColumnsTypes = LocalDB_schema.CNBP_schema_fields_types |
||
| 28 | |||
| 29 | NewColumnSpec = zip(NewColumns, NewColumnsTypes) |
||
| 30 | NewColumnSpecList = list(NewColumnSpec) |
||
| 31 | |||
| 32 | return LocalDBCreate(Path, TableName, KeyField, NewColumnSpecList) |
||
| 33 | |||
| 36 | create_localDB_CNBP("..\LocalDB\LocalDB_CNBPs.sqlite") |