Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend job postings DB schema #157

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions server/db/migrations/0010_far_the_order.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE "job_postings" ADD COLUMN "valid_till" date;--> statement-breakpoint
ALTER TABLE "job_postings" ADD COLUMN "is_expired" boolean DEFAULT false NOT NULL;
384 changes: 384 additions & 0 deletions server/db/migrations/meta/0010_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,384 @@
{
"id": "f390292a-f77c-47d1-b083-ba5270b117df",
"prevId": "1c9c0011-c57e-4840-ab36-a39bb4ba0e5c",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.hooks": {
"name": "hooks",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true
},
"title": {
"name": "title",
"type": "varchar(40)",
"primaryKey": false,
"notNull": true
},
"url": {
"name": "url",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"prefs": {
"name": "prefs",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"last_executed_at": {
"name": "last_executed_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"public.job_postings": {
"name": "job_postings",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true
},
"title": {
"name": "title",
"type": "varchar(150)",
"primaryKey": false,
"notNull": true
},
"contents": {
"name": "contents",
"type": "text",
"primaryKey": false,
"notNull": false
},
"tags_csv": {
"name": "tags_csv",
"type": "text",
"primaryKey": false,
"notNull": false
},
"owner_id": {
"name": "owner_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"is_published": {
"name": "is_published",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"total_applicants": {
"name": "total_applicants",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"valid_till": {
"name": "valid_till",
"type": "date",
"primaryKey": false,
"notNull": false
},
"is_expired": {
"name": "is_expired",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"job_postings_owner_id_users_id_fk": {
"name": "job_postings_owner_id_users_id_fk",
"tableFrom": "job_postings",
"tableTo": "users",
"columnsFrom": ["owner_id"],
"columnsTo": ["id"],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"public.metadata_entries": {
"name": "metadata_entries",
"schema": "",
"columns": {
"key": {
"name": "key",
"type": "varchar(48)",
"primaryKey": true,
"notNull": true
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"public.posting_applicants": {
"name": "posting_applicants",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true
},
"owner_id": {
"name": "owner_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"job_id": {
"name": "job_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"posting_applicants_owner_id_users_id_fk": {
"name": "posting_applicants_owner_id_users_id_fk",
"tableFrom": "posting_applicants",
"tableTo": "users",
"columnsFrom": ["owner_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
"posting_applicants_job_id_job_postings_id_fk": {
"name": "posting_applicants_job_id_job_postings_id_fk",
"tableFrom": "posting_applicants",
"tableTo": "job_postings",
"columnsFrom": ["job_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"public.review_tags": {
"name": "review_tags",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"title": {
"name": "title",
"type": "varchar(32)",
"primaryKey": false,
"notNull": true
},
"parent": {
"name": "parent",
"type": "smallint",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"public.user_handles": {
"name": "user_handles",
"schema": "",
"columns": {
"user_id": {
"name": "user_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"key": {
"name": "key",
"type": "varchar(15)",
"primaryKey": false,
"notNull": true
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"user_handles_user_id_users_id_fk": {
"name": "user_handles_user_id_users_id_fk",
"tableFrom": "user_handles",
"tableTo": "users",
"columnsFrom": ["user_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"public.users": {
"name": "users",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true
},
"first_name": {
"name": "first_name",
"type": "varchar(50)",
"primaryKey": false,
"notNull": false
},
"last_name": {
"name": "last_name",
"type": "varchar(50)",
"primaryKey": false,
"notNull": false
},
"picture": {
"name": "picture",
"type": "text",
"primaryKey": false,
"notNull": false
},
"email": {
"name": "email",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"permission": {
"name": "permission",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"top_5_skills_csv": {
"name": "top_5_skills_csv",
"type": "text",
"primaryKey": false,
"notNull": false
},
"is_admin": {
"name": "is_admin",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"users_email_unique": {
"name": "users_email_unique",
"nullsNotDistinct": false,
"columns": ["email"]
}
}
}
},
"enums": {},
"schemas": {},
"sequences": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
Loading