@LeventeHunyadi
Following the complete rebuild of my DB, I'm encountering only 1 error, but it's not allowing me to move past it on the course_sections table. I've tried both deleting the table from my DB and using the "dropdb" method with the same negative results:
$ dap dropdb --namespace canvas --table course_sections
INFO:pysqlsync.postgres:connecting to postgres@canvas-data-2.ccmfhqnzit0p.us-east-2.rds.amazonaws.com:5432/cd2
INFO:pysqlsync.postgres:PostgreSQL version 14.0.10 final
INFO:pysqlsync.postgres:connecting to postgres@canvas-data-2.ccmfhqnzit0p.us-east-2.rds.amazonaws.com:5432/cd2
INFO:pysqlsync.postgres:PostgreSQL version 14.0.10 final
2024-03-04 10:56:27,135 - ERROR - table not initialized, use `initdb`
$ dap initdb --namespace canvas --table course_sections
INFO:pysqlsync.postgres:connecting to postgres@canvas-data-2.ccmfhqnzit0p.us-east-2.rds.amazonaws.com:5432/cd2
INFO:pysqlsync.postgres:PostgreSQL version 14.0.10 final
INFO:pysqlsync.postgres:connecting to postgres@canvas-data-2.ccmfhqnzit0p.us-east-2.rds.amazonaws.com:5432/cd2
INFO:pysqlsync.postgres:PostgreSQL version 14.0.10 final
INFO:pysqlsync:synchronize schema with SQL:
CREATE TABLE "canvas"."course_sections" (
"id" bigint NOT NULL,
"name" varchar(255) NOT NULL,
"course_id" bigint NOT NULL,
"integration_id" varchar(255),
"created_at" timestamp NOT NULL,
"updated_at" timestamp NOT NULL,
"workflow_state" "canvas"."course_sections__workflow_state" NOT NULL,
"sis_batch_id" bigint,
"start_at" timestamp,
"end_at" timestamp,
"sis_source_id" varchar(255),
"default_section" boolean,
"accepting_enrollments" boolean,
"restrict_enrollments_to_section_dates" boolean,
"nonxlist_course_id" bigint,
"enrollment_term_id" bigint,
CONSTRAINT "pk_canvas_course_sections" PRIMARY KEY ("id")
);
COMMENT ON COLUMN "canvas"."course_sections"."id" IS 'The unique identifier for the section.';
COMMENT ON COLUMN "canvas"."course_sections"."name" IS 'The name of the section.';
COMMENT ON COLUMN "canvas"."course_sections"."course_id" IS 'The unique Canvas identifier for the course in which the section belongs.';
COMMENT ON COLUMN "canvas"."course_sections"."integration_id" IS 'The integration ID of the section. This field is only included if there is an integration set up between Canvas and SIS.';
COMMENT ON COLUMN "canvas"."course_sections"."created_at" IS 'Timestamp for when this section was entered into the system.';
COMMENT ON COLUMN "canvas"."course_sections"."updated_at" IS 'Timestamp for when the last time the section was updated.';
COMMENT ON COLUMN "canvas"."course_sections"."workflow_state" IS 'Life-cycle state for the section.';
COMMENT ON COLUMN "canvas"."course_sections"."sis_batch_id" IS 'The unique identifier for the SIS import if created through SIS.';
COMMENT ON COLUMN "canvas"."course_sections"."start_at" IS 'The start date for the section, if applicable. When a user is allowed to participate in a course. enrollment term dates, course dates, and course section dates flow together in all aspects of Canvas. Various dates allow different users to participate in the course. The hierarchy of dates are: course section dates override course dates, course dates override term dates.';
COMMENT ON COLUMN "canvas"."course_sections"."end_at" IS 'The end date for the section, if applicable. When a user is allowed to participate in a course.';
COMMENT ON COLUMN "canvas"."course_sections"."sis_source_id" IS 'Id for the correlated record for the section in the SIS (assuming SIS integration has been properly configured).';
COMMENT ON COLUMN "canvas"."course_sections"."default_section" IS 'True if this is the default section.';
COMMENT ON COLUMN "canvas"."course_sections"."accepting_enrollments" IS 'True if this section is open for enrollment.';
COMMENT ON COLUMN "canvas"."course_sections"."restrict_enrollments_to_section_dates" IS 'Restrict user enrollments to the start and end dates of the section. True when "Users can only participate in the course between these dates" is checked.';
COMMENT ON COLUMN "canvas"."course_sections"."nonxlist_course_id" IS 'The unique identifier of the original course of a cross-listed section.';
COMMENT ON COLUMN "canvas"."course_sections"."enrollment_term_id" IS 'Identifies the associated enrollment term.';
2024-03-04 10:59:00,321 - INFO - Query started with job ID: 8f3143fc-287f-4051-8454-4c3a76e37c6e
2024-03-04 10:59:00,602 - INFO - Data has been successfully retrieved:
{"id": "8f3143fc-287f-4051-8454-4c3a76e37c6e", "status": "complete", "expires_at": "2024-03-05T16:53:10Z", "objects": [{"id": "8f3143fc-287f-4051-8454-4c3a76e37c6e/part-00000-de8f428b-cf7c-40d7-a725-2f70a213916d-c000.tsv.gz"}], "schema_version": 1, "at": "2024-03-04T15:01:05Z"}
2024-03-04 10:59:10,594 - ERROR - null value in column "name" of relation "course_sections" violates not-null constraint
DETAIL: Failing row contains (29818, null, 17349, null, 2022-03-07 16:08:02.961, 2022-03-07 16:10:13.093, active, null, null, null, null, null, null, null, null, null).