()
| 48 | |
| 49 | |
| 50 | async def run(): |
| 51 | print("SQLite:\n") |
| 52 | await Tortoise.init(db_url="sqlite://:memory:", modules={"models": ["__main__"]}) |
| 53 | sql = get_schema_sql(connections.get("default"), safe=False) |
| 54 | print(sql) |
| 55 | |
| 56 | print("\n\nMySQL:\n") |
| 57 | await Tortoise.init(db_url="mysql://root:@127.0.0.1:3306/", modules={"models": ["__main__"]}) |
| 58 | sql = get_schema_sql(connections.get("default"), safe=False) |
| 59 | print(sql) |
| 60 | |
| 61 | print("\n\nPostgreSQL:\n") |
| 62 | await Tortoise.init( |
| 63 | db_url="postgres://postgres:@127.0.0.1:5432/", modules={"models": ["__main__"]} |
| 64 | ) |
| 65 | sql = get_schema_sql(connections.get("default"), safe=False) |
| 66 | print(sql) |
| 67 | |
| 68 | |
| 69 | if __name__ == "__main__": |
no test coverage detected