ALTER TABLE "classes" DROP CONSTRAINT "classes_period_id_periods_id_fk";
--> statement-breakpoint
ALTER TABLE "attendance" ADD COLUMN "partial_id" uuid;--> statement-breakpoint
ALTER TABLE "classes" ADD COLUMN "credits" integer NOT NULL;--> statement-breakpoint
ALTER TABLE "classes" ADD COLUMN "description" text;--> statement-breakpoint
ALTER TABLE "partials" ADD COLUMN "start_date" date NOT NULL;--> statement-breakpoint
ALTER TABLE "partials" ADD COLUMN "end_date" date NOT NULL;--> statement-breakpoint
ALTER TABLE "sections" ADD COLUMN "period_id" uuid;--> statement-breakpoint
ALTER TABLE "sections" ADD COLUMN "max_students" integer NOT NULL;--> statement-breakpoint
ALTER TABLE "attendance" ADD CONSTRAINT "attendance_partial_id_partials_id_fk" FOREIGN KEY ("partial_id") REFERENCES "public"."partials"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "sections" ADD CONSTRAINT "sections_period_id_periods_id_fk" FOREIGN KEY ("period_id") REFERENCES "public"."periods"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "classes" DROP COLUMN "period_id";