This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
forked from eesast/hasura
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request eesast#144 from xiangmy21/dev
feat(application_time): add honor_time, honor_type, mentor_time, from…
- Loading branch information
Showing
23 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
migrations/1708227767602_create_table_public_honor_time/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP TABLE "public"."honor_time"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'荣誉申请时间表'; |
1 change: 1 addition & 0 deletions
1
migrations/1708227840355_alter_table_public_honor_time_alter_column_end_B/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "public"."honor_time" ALTER COLUMN "end_B" TYPE date; |
1 change: 1 addition & 0 deletions
1
migrations/1708227840355_alter_table_public_honor_time_alter_column_end_B/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "public"."honor_time" ALTER COLUMN "end_B" TYPE timestamptz; |
1 change: 1 addition & 0 deletions
1
migrations/1708227843053_alter_table_public_honor_time_alter_column_start_B/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "public"."honor_time" ALTER COLUMN "start_B" TYPE date; |
1 change: 1 addition & 0 deletions
1
migrations/1708227843053_alter_table_public_honor_time_alter_column_start_B/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "public"."honor_time" ALTER COLUMN "start_B" TYPE timestamptz; |
1 change: 1 addition & 0 deletions
1
migrations/1708227887322_alter_table_public_honor_time_alter_column_start_A/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "public"."honor_time" ALTER COLUMN "start_A" drop default; |
1 change: 1 addition & 0 deletions
1
migrations/1708227887322_alter_table_public_honor_time_alter_column_start_A/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
1 change: 1 addition & 0 deletions
1
migrations/1708227893216_alter_table_public_honor_time_alter_column_end_A/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "public"."honor_time" ALTER COLUMN "end_A" drop default; |
1 change: 1 addition & 0 deletions
1
migrations/1708227893216_alter_table_public_honor_time_alter_column_end_A/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
4 changes: 4 additions & 0 deletions
4
migrations/1708228618883_alter_table_public_honor_time_add_column_activateIn/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
2 changes: 2 additions & 0 deletions
2
migrations/1708228618883_alter_table_public_honor_time_add_column_activateIn/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
1 change: 1 addition & 0 deletions
1
migrations/1708228637418_alter_table_public_honor_time_alter_column_activateIn/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
alter table "public"."honor_time" alter column "activateIn" set default '2024'; |
1 change: 1 addition & 0 deletions
1
migrations/1708228637418_alter_table_public_honor_time_alter_column_activateIn/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE "public"."honor_time" ALTER COLUMN "activateIn" drop default; |
4 changes: 4 additions & 0 deletions
4
migrations/1708229305147_modify_primarykey_public_honor_time/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
6 changes: 6 additions & 0 deletions
6
migrations/1708229305147_modify_primarykey_public_honor_time/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
1 change: 1 addition & 0 deletions
1
migrations/1708232425927_create_table_public_mentor_time/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP TABLE "public"."mentor_time"; |
1 change: 1 addition & 0 deletions
1
migrations/1708232425927_create_table_public_mentor_time/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'导师申请时间表'; |
1 change: 1 addition & 0 deletions
1
migrations/1708233267425_create_table_public_honor_type/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DROP TABLE "public"."honor_type"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'荣誉类别'; |
5 changes: 5 additions & 0 deletions
5
migrations/1708233372333_alter_table_public_honor_type_drop_column_type_id/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
1 change: 1 addition & 0 deletions
1
migrations/1708233372333_alter_table_public_honor_type_drop_column_type_id/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
alter table "public"."honor_type" drop column "type_id" cascade; |