Guest User

fos_user table and indexes

a guest
Apr 2nd, 2013
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.52 KB | None | 0 0
  1. CREATE TABLE fos_user
  2. (
  3. id integer NOT NULL,
  4. updated_by_id integer,
  5. created_by_id integer,
  6. username character varying(255) NOT NULL,
  7. username_canonical character varying(255) NOT NULL,
  8. email character varying(255) NOT NULL,
  9. email_canonical character varying(255) NOT NULL,
  10. enabled boolean NOT NULL,
  11. salt character varying(255) NOT NULL,
  12. password character varying(255) NOT NULL,
  13. last_login timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
  14. locked boolean NOT NULL,
  15. expired boolean NOT NULL,
  16. expires_at timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
  17. confirmation_token character varying(255) DEFAULT NULL::character varying,
  18. password_requested_at timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
  19. roles text NOT NULL, -- (DC2Type:array)
  20. credentials_expired boolean NOT NULL,
  21. credentials_expire_at timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
  22. created_at timestamp(0) without time zone NOT NULL,
  23. updated_at timestamp(0) without time zone NOT NULL,
  24. date_of_birth timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
  25. firstname character varying(64) DEFAULT NULL::character varying,
  26. lastname character varying(64) DEFAULT NULL::character varying,
  27. website character varying(64) DEFAULT NULL::character varying,
  28. biography character varying(255) DEFAULT NULL::character varying,
  29. gender character varying(1) DEFAULT NULL::character varying,
  30. locale character varying(8) DEFAULT NULL::character varying,
  31. timezone character varying(64) DEFAULT NULL::character varying,
  32. phone character varying(64) DEFAULT NULL::character varying,
  33. facebook_uid character varying(255) DEFAULT NULL::character varying,
  34. facebook_name character varying(255) DEFAULT NULL::character varying,
  35. facebook_data text, -- (DC2Type:json)
  36. twitter_uid character varying(255) DEFAULT NULL::character varying,
  37. twitter_name character varying(255) DEFAULT NULL::character varying,
  38. twitter_data text, -- (DC2Type:json)
  39. gplus_uid character varying(255) DEFAULT NULL::character varying,
  40. gplus_name character varying(255) DEFAULT NULL::character varying,
  41. gplus_data text, -- (DC2Type:json)
  42. token character varying(255) DEFAULT NULL::character varying,
  43. two_step_code character varying(255) DEFAULT NULL::character varying,
  44. updated timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
  45. created timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
  46. deleted timestamp(0) without time zone DEFAULT NULL::timestamp without time zone,
  47. department_id integer,
  48. CONSTRAINT fos_user_pkey PRIMARY KEY (id ),
  49. CONSTRAINT fk_957a6479896dbbde FOREIGN KEY (updated_by_id)
  50. REFERENCES fos_user (id) MATCH SIMPLE
  51. ON UPDATE NO ACTION ON DELETE NO ACTION,
  52. CONSTRAINT fk_957a6479ae80f5df FOREIGN KEY (department_id)
  53. REFERENCES department (id) MATCH SIMPLE
  54. ON UPDATE NO ACTION ON DELETE NO ACTION,
  55. CONSTRAINT fk_957a6479b03a8386 FOREIGN KEY (created_by_id)
  56. REFERENCES fos_user (id) MATCH SIMPLE
  57. ON UPDATE NO ACTION ON DELETE NO ACTION
  58. )
  59. WITH (
  60. OIDS=FALSE
  61. );
  62. ALTER TABLE fos_user
  63. OWNER TO sd4;
  64. COMMENT ON COLUMN fos_user.roles IS '(DC2Type:array)';
  65. COMMENT ON COLUMN fos_user.facebook_data IS '(DC2Type:json)';
  66. COMMENT ON COLUMN fos_user.twitter_data IS '(DC2Type:json)';
  67. COMMENT ON COLUMN fos_user.gplus_data IS '(DC2Type:json)';
  68.  
  69.  
  70. -- Index: idx_957a64793124b5b6
  71.  
  72. -- DROP INDEX idx_957a64793124b5b6;
  73.  
  74. CREATE INDEX idx_957a64793124b5b6
  75. ON fos_user
  76. USING btree
  77. (lastname COLLATE pg_catalog."default" );
  78.  
  79. -- Index: idx_957a647950f9bb84
  80.  
  81. -- DROP INDEX idx_957a647950f9bb84;
  82.  
  83. CREATE INDEX idx_957a647950f9bb84
  84. ON fos_user
  85. USING btree
  86. (enabled );
  87.  
  88. -- Index: idx_957a647983a00e68
  89.  
  90. -- DROP INDEX idx_957a647983a00e68;
  91.  
  92. CREATE INDEX idx_957a647983a00e68
  93. ON fos_user
  94. USING btree
  95. (firstname COLLATE pg_catalog."default" );
  96.  
  97. -- Index: idx_957a647983a00e683124b5b6
  98.  
  99. -- DROP INDEX idx_957a647983a00e683124b5b6;
  100.  
  101. CREATE INDEX idx_957a647983a00e683124b5b6
  102. ON fos_user
  103. USING btree
  104. (firstname COLLATE pg_catalog."default" , lastname COLLATE pg_catalog."default" );
  105.  
  106. -- Index: idx_957a6479896dbbde
  107.  
  108. -- DROP INDEX idx_957a6479896dbbde;
  109.  
  110. CREATE INDEX idx_957a6479896dbbde
  111. ON fos_user
  112. USING btree
  113. (updated_by_id );
  114.  
  115. -- Index: idx_957a6479ae80f5df
  116.  
  117. -- DROP INDEX idx_957a6479ae80f5df;
  118.  
  119. CREATE INDEX idx_957a6479ae80f5df
  120. ON fos_user
  121. USING btree
  122. (department_id );
  123.  
  124. -- Index: idx_957a6479b03a8386
  125.  
  126. -- DROP INDEX idx_957a6479b03a8386;
  127.  
  128. CREATE INDEX idx_957a6479b03a8386
  129. ON fos_user
  130. USING btree
  131. (created_by_id );
  132.  
  133. -- Index: idx_957a6479b23db7b8
  134.  
  135. -- DROP INDEX idx_957a6479b23db7b8;
  136.  
  137. CREATE INDEX idx_957a6479b23db7b8
  138. ON fos_user
  139. USING btree
  140. (created );
  141.  
  142. -- Index: idx_957a6479c69b96f7
  143.  
  144. -- DROP INDEX idx_957a6479c69b96f7;
  145.  
  146. CREATE INDEX idx_957a6479c69b96f7
  147. ON fos_user
  148. USING btree
  149. (updated );
  150.  
  151. -- Index: idx_957a6479eb3b4e33
  152.  
  153. -- DROP INDEX idx_957a6479eb3b4e33;
  154.  
  155. CREATE INDEX idx_957a6479eb3b4e33
  156. ON fos_user
  157. USING btree
  158. (deleted );
  159.  
  160. -- Index: uniq_957a647992fc23a8
  161.  
  162. -- DROP INDEX uniq_957a647992fc23a8;
  163.  
  164. CREATE UNIQUE INDEX uniq_957a647992fc23a8
  165. ON fos_user
  166. USING btree
  167. (username_canonical COLLATE pg_catalog."default" );
  168.  
  169. -- Index: uniq_957a6479a0d96fbf
  170.  
  171. -- DROP INDEX uniq_957a6479a0d96fbf;
  172.  
  173. CREATE UNIQUE INDEX uniq_957a6479a0d96fbf
  174. ON fos_user
  175. USING btree
  176. (email_canonical COLLATE pg_catalog."default" );
Advertisement
Add Comment
Please, Sign In to add comment