Guest User

Untitled

a guest
May 20th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.13 KB | None | 0 0
  1. CREATE TABLE public.redemptions
  2. (
  3. id integer NOT NULL DEFAULT nextval('redemptions_id_seq'::regclass),
  4. uuid character varying(255),
  5. code_value_id integer NOT NULL,
  6. created_at timestamp without time zone,
  7. updated_at timestamp without time zone,
  8. place_id integer,
  9. user_id integer,
  10. CONSTRAINT redemptions_pkey PRIMARY KEY (id)
  11. )
  12. WITH (
  13. OIDS=FALSE
  14. );
  15. ALTER TABLE public.redemptions
  16. OWNER TO al1;
  17.  
  18.  
  19. -- Index: public.index_redemptions_on_code_value_id
  20.  
  21. -- DROP INDEX public.index_redemptions_on_code_value_id;
  22.  
  23. CREATE INDEX index_redemptions_on_code_value_id
  24. ON public.redemptions
  25. USING btree
  26. (code_value_id);
  27. --------------------------------------------------
  28. CREATE TABLE public.places
  29. (
  30. id integer NOT NULL DEFAULT nextval('backend_place_id_seq'::regclass),
  31. name character varying(200) NOT NULL,
  32. geo_fence json,
  33. external_id character varying(200) NOT NULL,
  34. city character varying(200),
  35. country character varying(200),
  36. bounding_box_north double precision,
  37. bounding_box_south double precision,
  38. bounding_box_east double precision,
  39. bounding_box_west double precision,
  40. image character varying(100),
  41. created_at timestamp with time zone NOT NULL,
  42. updated_at timestamp with time zone NOT NULL,
  43. latitude double precision,
  44. longitude double precision,
  45. image_uid character varying(255),
  46. image_name character varying(255),
  47. featured boolean,
  48. active_benefits_count integer NOT NULL DEFAULT 0,
  49. radius integer NOT NULL DEFAULT 2000,
  50. terminal character varying(255),
  51. deleted_at timestamp without time zone,
  52. category integer NOT NULL DEFAULT 0,
  53. street character varying,
  54. zip character varying,
  55. twitter character varying,
  56. push_notification_message text,
  57. timezone character varying NOT NULL DEFAULT 'UTC'::character varying,
  58. twitter_boost boolean NOT NULL DEFAULT false,
  59. push_notification_message_enabled boolean NOT NULL DEFAULT true,
  60. geojson jsonb,
  61. push_notification_image_uid character varying,
  62. searchable boolean NOT NULL DEFAULT true,
  63. boost integer NOT NULL DEFAULT 0,
  64. geojson_active boolean DEFAULT false,
  65. CONSTRAINT backend_place_pkey PRIMARY KEY (id)
  66. )
  67. WITH (
  68. OIDS=FALSE
  69. );
  70. ALTER TABLE public.places
  71. OWNER TO al1;
  72.  
  73. -- Index: public.backend_place_bounding_box_east_29b664f93ee940b5_uniq
  74.  
  75. -- DROP INDEX public.backend_place_bounding_box_east_29b664f93ee940b5_uniq;
  76.  
  77. CREATE INDEX backend_place_bounding_box_east_29b664f93ee940b5_uniq
  78. ON public.places
  79. USING btree
  80. (bounding_box_east);
  81.  
  82. -- Index: public.backend_place_bounding_box_north_1388693cd40279f4_uniq
  83.  
  84. -- DROP INDEX public.backend_place_bounding_box_north_1388693cd40279f4_uniq;
  85.  
  86. CREATE INDEX backend_place_bounding_box_north_1388693cd40279f4_uniq
  87. ON public.places
  88. USING btree
  89. (bounding_box_north);
  90.  
  91. -- Index: public.backend_place_bounding_box_south_5a683c209f681fde_uniq
  92.  
  93. -- DROP INDEX public.backend_place_bounding_box_south_5a683c209f681fde_uniq;
  94.  
  95. CREATE INDEX backend_place_bounding_box_south_5a683c209f681fde_uniq
  96. ON public.places
  97. USING btree
  98. (bounding_box_south);
  99.  
  100. -- Index: public.backend_place_bounding_box_west_6fbd144757cbb4eb_uniq
  101.  
  102. -- DROP INDEX public.backend_place_bounding_box_west_6fbd144757cbb4eb_uniq;
  103.  
  104. CREATE INDEX backend_place_bounding_box_west_6fbd144757cbb4eb_uniq
  105. ON public.places
  106. USING btree
  107. (bounding_box_west);
  108.  
  109. -- Index: public.index_places_on_deleted_at
  110.  
  111. -- DROP INDEX public.index_places_on_deleted_at;
  112.  
  113. CREATE INDEX index_places_on_deleted_at
  114. ON public.places
  115. USING btree
  116. (deleted_at);
  117.  
  118. -- Index: public.index_places_on_external_id
  119.  
  120. -- DROP INDEX public.index_places_on_external_id;
  121.  
  122. CREATE INDEX index_places_on_external_id
  123. ON public.places
  124. USING btree
  125. (external_id COLLATE pg_catalog."default");
  126.  
  127. -- Index: public.index_places_on_searchable_and_updated_at
  128.  
  129. -- DROP INDEX public.index_places_on_searchable_and_updated_at;
  130.  
  131. CREATE INDEX index_places_on_searchable_and_updated_at
  132. ON public.places
  133. USING btree
  134. (searchable, updated_at);
  135.  
  136. -- Index: public.index_places_on_updated_at
  137.  
  138. -- DROP INDEX public.index_places_on_updated_at;
  139.  
  140. CREATE INDEX index_places_on_updated_at
  141. ON public.places
  142. USING btree
  143. (updated_at);
Add Comment
Please, Sign In to add comment