Skip to content

Instantly share code, notes, and snippets.

@femakin
Created December 8, 2023 11:26
Show Gist options
  • Save femakin/f1ecfa87c607744a65b03a6a1c11271a to your computer and use it in GitHub Desktop.
Save femakin/f1ecfa87c607744a65b03a6a1c11271a to your computer and use it in GitHub Desktop.
projects.sql
-- Table Definition
CREATE SEQUENCE IF NOT EXISTS projects_id_seq;
CREATE TABLE "projects" (
"id" int4 NOT NULL DEFAULT nextval('projects_id_seq'::regclass),
"name" varchar(255) NOT NULL,
"description" text NOT NULL,
"status" varchar(50) NOT NULL,
"start_date" date,
"end_date" date,
"created_at" timestamp(0) DEFAULT CURRENT_TIMESTAMP,
"updated_at" timestamp(0) DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY ("id")
);
-- Fake project data
INSERT INTO "projects" ("name", "description", "status", "start_date", "end_date", "created_at", "updated_at") VALUES
('Project Alpha', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'In Progress', '2023-01-01', '2023-03-01', '2023-11-16 14:00:00', '2023-11-16 14:00:00'),
('Project Beta', 'Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'Completed', '2023-02-01', '2023-04-01', '2023-11-16 14:05:00', '2023-11-16 14:05:00'),
('Project Gamma', 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.', 'Planned', '2023-03-01', '2023-06-01', '2023-11-16 14:10:00', '2023-11-16 14:10:00'),
('Project Delta', 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore.', 'In Progress', '2023-04-01', '2023-08-01', '2023-11-16 14:15:00', '2023-11-16 14:15:00'),
('Project Epsilon', 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'Planned', '2023-05-01', '2023-10-01', '2023-11-16 14:20:00', '2023-11-16 14:20:00');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment