/sql/Table/printers.sql

http://cupsfilter.googlecode.com/ · SQL · 28 lines · 19 code · 5 blank · 4 comment · 0 complexity · 296e5cb75905b69d95dc4a79ecf260b6 MD5 · raw file

  1. -- Table: printers
  2. -- DROP TABLE printers;
  3. CREATE TABLE printers
  4. (
  5. id serial NOT NULL,
  6. mandat_id integer NOT NULL,
  7. printer_name character varying(255) NOT NULL,
  8. date_created timestamp with time zone NOT NULL DEFAULT now(),
  9. descr text,
  10. ip_adress inet,
  11. CONSTRAINT printers_pkey PRIMARY KEY (id),
  12. CONSTRAINT "FK_mandat" FOREIGN KEY (mandat_id)
  13. REFERENCES printers_mandat (id) MATCH SIMPLE
  14. ON UPDATE NO ACTION ON DELETE NO ACTION
  15. )
  16. WITH (OIDS=FALSE);
  17. ALTER TABLE printers OWNER TO postgres;
  18. -- Index: "FKI_mandat"
  19. -- DROP INDEX "FKI_mandat";
  20. CREATE INDEX "FKI_mandat"
  21. ON printers
  22. USING btree
  23. (mandat_id);