Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request eesast#144 from xiangmy21/dev
Browse files Browse the repository at this point in the history
feat(application_time): add honor_time, honor_type, mentor_time, from…
  • Loading branch information
xiangmy21 authored Feb 18, 2024
2 parents 59d8ea2 + e77b2dc commit 6904981
Show file tree
Hide file tree
Showing 23 changed files with 47 additions and 0 deletions.
9 changes: 9 additions & 0 deletions metadata/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,12 @@
_lt: "2022-10-05T23:59:59+08:00"
- created_at:
_gt: "2022-10-01T00:00:00+08:00"
- table:
name: honor_time
schema: public
- table:
name: honor_type
schema: public
- table:
name: info_notice
schema: public
Expand Down Expand Up @@ -1849,6 +1855,9 @@
_eq: X-Hasura-User-Id
- to_id:
_eq: X-Hasura-User-Id
- table:
name: mentor_time
schema: public
- table:
name: postgraduate_application
schema: public
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE "public"."honor_time";
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE TABLE "public"."honor_time" ("start_A" timestamptz NOT NULL, "end_A" timestamptz NOT NULL, "start_B" date NOT NULL DEFAULT now(), "end_B" date NOT NULL DEFAULT now(), PRIMARY KEY ("start_A") );COMMENT ON TABLE "public"."honor_time" IS E'荣誉申请时间表';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "public"."honor_time" ALTER COLUMN "end_B" TYPE date;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "public"."honor_time" ALTER COLUMN "end_B" TYPE timestamptz;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "public"."honor_time" ALTER COLUMN "start_B" TYPE date;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "public"."honor_time" ALTER COLUMN "start_B" TYPE timestamptz;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "public"."honor_time" ALTER COLUMN "start_A" drop default;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table "public"."honor_time" alter column "start_A" set default now();
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "public"."honor_time" ALTER COLUMN "end_A" drop default;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table "public"."honor_time" alter column "end_A" set default now();
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."honor_time" add column "activateIn" Integer
-- not null unique default '2024';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter table "public"."honor_time" add column "activateIn" Integer
not null unique default '2024';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table "public"."honor_time" alter column "activateIn" set default '2024';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "public"."honor_time" ALTER COLUMN "activateIn" drop default;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
alter table "public"."honor_time" drop constraint "honor_time_pkey";
alter table "public"."honor_time"
add constraint "honor_time_pkey"
primary key ("start_A");
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BEGIN TRANSACTION;
ALTER TABLE "public"."honor_time" DROP CONSTRAINT "honor_time_pkey";

ALTER TABLE "public"."honor_time"
ADD CONSTRAINT "honor_time_pkey" PRIMARY KEY ("activateIn");
COMMIT TRANSACTION;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE "public"."mentor_time";
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE TABLE "public"."mentor_time" ("start_A" timestamptz NOT NULL DEFAULT now(), "end_A" timestamptz NOT NULL DEFAULT now(), "start_B" timestamptz NOT NULL DEFAULT now(), "end_B" timestamptz NOT NULL DEFAULT now(), "start_C" timestamptz NOT NULL DEFAULT now(), "end_C" timestamptz NOT NULL DEFAULT now(), "start_D" timestamptz NOT NULL DEFAULT now(), "end_D" timestamptz NOT NULL DEFAULT now(), "start_E" timestamptz NOT NULL DEFAULT now(), "end_E" timestamptz NOT NULL DEFAULT now(), "activateIn" integer NOT NULL, PRIMARY KEY ("activateIn") , UNIQUE ("activateIn"));COMMENT ON TABLE "public"."mentor_time" IS E'导师申请时间表';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE "public"."honor_type";
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE TABLE "public"."honor_type" ("type_id" serial NOT NULL, "type_name" text NOT NULL, PRIMARY KEY ("type_name") , UNIQUE ("type_id"), UNIQUE ("type_name"));COMMENT ON TABLE "public"."honor_type" IS E'荣誉类别';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
comment on column "public"."honor_type"."type_id" is E'荣誉类别';
alter table "public"."honor_type" alter column "type_id" set default nextval('honor_type_type_id_seq'::regclass);
alter table "public"."honor_type" add constraint "honor_type_type_id_key" unique (type_id);
alter table "public"."honor_type" alter column "type_id" drop not null;
alter table "public"."honor_type" add column "type_id" int4;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alter table "public"."honor_type" drop column "type_id" cascade;

0 comments on commit 6904981

Please sign in to comment.