Skip to content

Commit

Permalink
add list of tables to ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
johnclary committed Aug 27, 2024
1 parent ab945b8 commit 2202c16
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions vision-zero
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ if not os.path.exists(".env"):

load_dotenv()

TABLES_TO_IGNORE = [
"public.atd_txdot_change_log",
"public.polygons",
"public.change_log_crashes",
"public.change_log_crashes_cris",
"public.change_log_units_cris",
"public.change_log_people_cris",
"public.change_log_people",
"public.change_log_units",
"public.change_log_people_edits",
"public.change_log_units_edits",
"public.change_log_crashes_edits",
"public.atd_txdot_crashes",
"public.atd_txdot_units",
"public.atd_txdot_person",
"public.atd_txdot_primaryperson",
]

def checkDockerComposeAvailability():
docker_compose_stand_alone = False # old docker-compose
docker_compose_bundled = False # new docker compose
Expand Down Expand Up @@ -95,7 +113,6 @@ def removeSnapshots(args):
def replicateDb(args):
graphqlEngineDown(args)

# print(tool_runner_command + replicate_command)
snapshotFilename = ""
if(args.filename):
snapshotFilename = args.filename
Expand Down Expand Up @@ -134,8 +151,9 @@ def replicateDb(args):
#"-t", "atd_txdot_crashes",
]
if not args.include_change_log_data:
replicate_command.append("--exclude-table-data")
replicate_command.append("atd_txdot_change_log")
for t in TABLES_TO_IGNORE:
replicate_command.append("--exclude-table-data")
replicate_command.append(t)

postgres_db_runner_command = docker_compose_invocation + [
"-f", "docker-compose.yml",
Expand Down

0 comments on commit 2202c16

Please sign in to comment.