-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/chanzuckerberg/czid-platfor…
…mics into raboukhalil/cleanup-unused-schema # Conflicts: # workflows/entity_gql_schema.py
- Loading branch information
Showing
11 changed files
with
157 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This Dockerfile is used only because we rely on curl, and can be removed if we upgrade | ||
# to a version of moto > 4.1.12 | ||
|
||
# The version of moto is pinned to 4.1.0 because s3parcp is unable to parse date strings in later version | ||
# see: https://github.com/aws/aws-sdk-go-v2/issues/1981 | ||
FROM motoserver/moto:4.1.0 | ||
|
||
RUN apt-get update && apt-get install -y curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
from platformics.api.core.settings import APISettings | ||
from sqlalchemy_utils import create_database, database_exists | ||
|
||
|
||
def create_db(): | ||
settings = APISettings.parse_obj({}) | ||
db_uri = settings.SYNC_DB_URI | ||
if database_exists(db_uri): | ||
print("Database already exists!") | ||
|
||
else: | ||
print("Database does not exist, creating database") | ||
create_database(db_uri) | ||
print("Database created") | ||
|
||
|
||
if __name__ == "__main__": | ||
create_db() | ||
create_db() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters