/*
 Navicat Premium Data Transfer

 Source Server         : anjabbawah
 Source Server Type    : PostgreSQL
 Source Server Version : 150003 (150003)
 Source Host           : localhost:5432
 Source Catalog        : sppai
 Source Schema         : public

 Target Server Type    : PostgreSQL
 Target Server Version : 150003 (150003)
 File Encoding         : 65001

 Date: 09/01/2026 12:23:36
*/


-- ----------------------------
-- Table structure for ms_study_programs
-- ----------------------------
DROP TABLE IF EXISTS "public"."ms_study_programs";
CREATE TABLE "public"."ms_study_programs" (
  "id" int8 NOT NULL DEFAULT nextval('ms_study_programs_id_seq'::regclass),
  "study_program_code" varchar(20) COLLATE "pg_catalog"."default",
  "study_program_name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "department_id" int8,
  "created_at" timestamp(6),
  "updated_at" timestamp(6),
  "deleted_at" timestamp(6),
  "ssbopt_cluster_id" int4,
  "nilai_akreditasi_prodi" numeric(4,2) DEFAULT 0,
  "status_akreditasi" varchar(50) COLLATE "pg_catalog"."default"
)
;

-- ----------------------------
-- Records of ms_study_programs
-- ----------------------------
INSERT INTO "public"."ms_study_programs" VALUES (4, 'PJSD-S1', 'S1 Pendidikan Jasmani Sekolah Dasar', 1, NULL, NULL, NULL, NULL, 0.00, 'Unggul');
INSERT INTO "public"."ms_study_programs" VALUES (5, 'PJSD-S2', 'S2 Pendidikan Jasmani Sekolah Dasar', 1, NULL, NULL, NULL, NULL, 0.00, 'Unggul');
INSERT INTO "public"."ms_study_programs" VALUES (6, 'PJSD-S3', 'S3 Pendidikan Jasmani Sekolah Dasar', 1, NULL, NULL, NULL, NULL, 0.00, 'Unggul');

-- ----------------------------
-- Primary Key structure for table ms_study_programs
-- ----------------------------
ALTER TABLE "public"."ms_study_programs" ADD CONSTRAINT "pk_ms_study_programs" PRIMARY KEY ("id");

-- ----------------------------
-- Foreign Keys structure for table ms_study_programs
-- ----------------------------
ALTER TABLE "public"."ms_study_programs" ADD CONSTRAINT "fk_prodi_ssbopt_cluster" FOREIGN KEY ("ssbopt_cluster_id") REFERENCES "public"."ref_ssbopt_clusters" ("id") ON DELETE SET NULL ON UPDATE NO ACTION;
ALTER TABLE "public"."ms_study_programs" ADD CONSTRAINT "fk_study_program_department_v2" FOREIGN KEY ("department_id") REFERENCES "public"."ms_departments" ("id") ON DELETE SET NULL ON UPDATE CASCADE;
