-- modify "anwesenheit" table
ALTER TABLE "anwesenheit" ALTER COLUMN "card_uid" SET NOT NULL, ALTER COLUMN "check_in_out" SET NOT NULL, ADD COLUMN "anwesenheit_typ" smallint NULL;
-- modify "wochen_report" table
ALTER TABLE "wochen_report" ADD COLUMN "ueberstunden" smallint NULL;
-- create "s_abwesenheit_typen" table
CREATE TABLE "s_abwesenheit_typen" (
  "abwesenheit_id" smallint NOT NULL,
  "abwesenheit_name" character varying(255) NULL,
  PRIMARY KEY ("abwesenheit_id")
);
-- create "s_anwesenheit_typen" table
CREATE TABLE "s_anwesenheit_typen" (
  "anwesenheit_id" smallint NOT NULL,
  "anwesenheit_name" character varying(255) NULL,
  PRIMARY KEY ("anwesenheit_id")
);
-- rename "s_personal_daten" table
ALTER TABLE "personal_daten" RENAME TO "s_personal_daten";

-- rename a constraint from "personal_daten_pkey" to "s_personal_daten_pkey"
ALTER TABLE "s_personal_daten" RENAME CONSTRAINT "personal_daten_pkey" TO "s_personal_daten_pkey";
