default.txt 573 B

12345678910111213141516171819
  1. BEGIN;
  2. CREATE TABLE "topic" (
  3. -- This is the greatest table of all time
  4. "id" serial NOT NULL PRIMARY KEY,
  5. "forum_id" integer NOT NULL,
  6. "subject" varchar(255) NOT NULL -- Because nobody likes an empty subject
  7. );
  8. ALTER TABLE "topic" ADD CONSTRAINT forum_id FOREIGN KEY ("forum_id") REFERENCES "forum" ("id");
  9. -- Initials
  10. insert into "topic" ("forum_id", "subject") values (2, 'D''artagnian');
  11. select /* comment */ count(*) from cicero_forum;
  12. -- this line lacks ; at the end to allow people to be sloppy and omit it in one-liners
  13. /*
  14. but who cares?
  15. */
  16. COMMIT