pwb 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (442) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -25
  3. data/app/assets/fonts/fonts/FontAwesome.otf +0 -0
  4. data/app/assets/fonts/fonts/fontawesome-webfont.eot +0 -0
  5. data/app/assets/fonts/fonts/fontawesome-webfont.svg +2668 -637
  6. data/app/assets/fonts/fonts/fontawesome-webfont.ttf +0 -0
  7. data/app/assets/fonts/fonts/fontawesome-webfont.woff +0 -0
  8. data/app/assets/fonts/fonts/fontawesome-webfont.woff2 +0 -0
  9. data/app/assets/javascripts/pwb/shared/page-content.js +24 -0
  10. data/app/assets/javascripts/pwb/shared/squares-container.js +58 -0
  11. data/app/assets/javascripts/pwb/shared/vue-main.js +1 -1
  12. data/app/assets/javascripts/pwb/shared/vue-squares.js.erb +74 -0
  13. data/app/assets/javascripts/pwb/squares/tabable-section.js +47 -0
  14. data/app/assets/javascripts/pwb/themes/squares.js.erb +45 -0
  15. data/app/assets/javascripts/pwb/themes/vic.js.erb +152 -0
  16. data/app/assets/javascripts/pwb_admin_panel/application_legacy_1.js +5 -0
  17. data/app/assets/stylesheets/pwb/themes/berlin.scss +4 -0
  18. data/app/assets/stylesheets/pwb/themes/berlin/main.scss +1 -1
  19. data/app/assets/stylesheets/pwb/themes/default.scss +1 -0
  20. data/app/assets/stylesheets/pwb/themes/default/carousel.scss +2 -1
  21. data/app/assets/stylesheets/pwb/themes/default/landing_content_areas.scss +13 -13
  22. data/app/assets/stylesheets/pwb/themes/default/shame.scss +0 -16
  23. data/app/assets/stylesheets/pwb/themes/matt.scss +18 -0
  24. data/app/assets/stylesheets/pwb/themes/shared/liquid_templates.scss +37 -0
  25. data/app/assets/stylesheets/pwb/themes/shared/shame.scss +7 -0
  26. data/app/assets/stylesheets/pwb/themes/squares.scss +22 -0
  27. data/app/assets/stylesheets/pwb/themes/squares/vue-material-docs.scss +200 -0
  28. data/app/assets/stylesheets/pwb/themes/squares/vue-material-vars.scss +141 -0
  29. data/app/assets/stylesheets/pwb/themes/vic.scss +104 -0
  30. data/app/assets/stylesheets/pwb/themes/vic/general.scss +15 -0
  31. data/app/assets/stylesheets/pwb/themes/vic/landing.scss +189 -0
  32. data/app/assets/stylesheets/pwb/themes/vic/slider.scss +127 -0
  33. data/app/assets/stylesheets/pwb_admin_panel/application_legacy_1.scss +6 -0
  34. data/app/controllers/pwb/admin_panel_controller.rb +7 -1
  35. data/app/controllers/pwb/api/v1/clients_controller.rb +35 -0
  36. data/app/controllers/pwb/api/v1/contacts_controller.rb +41 -0
  37. data/app/controllers/pwb/api/v1/links_controller.rb +47 -0
  38. data/app/controllers/pwb/api/v1/page_controller.rb +117 -0
  39. data/app/controllers/pwb/api/v1/page_fragments_controller.rb +74 -0
  40. data/app/controllers/pwb/api/v1/properties_controller.rb +30 -9
  41. data/app/controllers/pwb/api/v1/sections_controller.rb +27 -26
  42. data/app/controllers/pwb/api/v1/website_controller.rb +11 -11
  43. data/app/controllers/pwb/application_controller.rb +22 -11
  44. data/app/controllers/pwb/{sections_controller.rb → contact_us_controller.rb} +24 -45
  45. data/app/controllers/pwb/css_controller.rb +5 -2
  46. data/app/controllers/pwb/pages_controller.rb +36 -0
  47. data/app/controllers/pwb/search_controller.rb +33 -11
  48. data/app/controllers/pwb/squares_controller.rb +48 -0
  49. data/app/controllers/pwb/welcome_controller.rb +30 -5
  50. data/app/helpers/pwb/application_helper.rb +50 -49
  51. data/app/helpers/pwb/css_helper.rb +14 -0
  52. data/app/helpers/pwb/navigation_helper.rb +82 -0
  53. data/app/models/pwb/contact.rb +25 -0
  54. data/app/models/pwb/content.rb +26 -8
  55. data/app/models/pwb/content_photo.rb +18 -0
  56. data/app/models/pwb/link.rb +41 -0
  57. data/app/models/pwb/message.rb +1 -1
  58. data/app/models/pwb/page.rb +227 -0
  59. data/app/models/pwb/page_content.rb +33 -0
  60. data/app/models/pwb/page_part.rb +17 -0
  61. data/app/models/pwb/preset_style.rb +37 -0
  62. data/app/models/pwb/prop.rb +4 -0
  63. data/app/models/pwb/website.rb +64 -9
  64. data/app/resources/pwb/api/v1/{section_resource.rb → client_resource.rb} +3 -4
  65. data/app/resources/pwb/api/v1/property_resource.rb +23 -4
  66. data/app/resources/pwb/api/v1/web_content_resource.rb +1 -1
  67. data/app/resources/pwb/api_public/v1/prop_resource.rb +9 -2
  68. data/{db/cms_fixtures/cms/layouts/about-us/content.html → app/themes/airbnb/views/layouts/pwb/_generic_modal.html.erb} +0 -0
  69. data/{db/cms_fixtures/cms/layouts/about-us/javascript.js → app/themes/airbnb/views/layouts/pwb/_login_modal.html.erb} +0 -0
  70. data/app/themes/airbnb/views/layouts/pwb/application.html.erb +82 -0
  71. data/app/themes/airbnb/views/pwb/_footer.html.erb +25 -0
  72. data/app/themes/airbnb/views/pwb/props/_images_section_carousel.html.erb +43 -0
  73. data/app/themes/airbnb/views/pwb/props/show.html.erb +69 -0
  74. data/app/themes/airbnb/views/pwb/search/_search_form_for_rent.html.erb +183 -0
  75. data/app/themes/airbnb/views/pwb/search/_search_results.html.erb +34 -0
  76. data/app/themes/airbnb/views/pwb/search/buy.html.erb +65 -0
  77. data/app/themes/airbnb/views/pwb/search/rent.html.erb +87 -0
  78. data/app/themes/airbnb/views/pwb/sections/_contact_us_form.html.erb +49 -0
  79. data/app/themes/airbnb/views/pwb/sections/contact_us.html.erb +56 -0
  80. data/app/themes/airbnb/views/pwb/welcome/_content_area_cols.html.erb +12 -0
  81. data/app/themes/airbnb/views/pwb/welcome/_single_property_row.html.erb +51 -0
  82. data/app/themes/airbnb/views/pwb/welcome/index.html.erb +66 -0
  83. data/app/themes/berlin/views/pwb/_footer.html.erb +15 -20
  84. data/app/themes/berlin/views/pwb/_header.html.erb +7 -9
  85. data/app/themes/berlin/views/pwb/pages/show.html.erb +50 -0
  86. data/app/themes/berlin/views/pwb/search/buy.html.erb +1 -1
  87. data/app/themes/berlin/views/pwb/search/rent.html.erb +1 -2
  88. data/app/themes/berlin/views/pwb/sections/contact_us.html.erb +1 -1
  89. data/app/themes/berlin/views/pwb/welcome/index.html.erb +51 -7
  90. data/app/themes/config.json +14 -0
  91. data/app/themes/default/views/pwb/{sections/cms.html.erb → pages/show.html.erb} +9 -8
  92. data/app/themes/default/views/pwb/search/buy.html.erb +1 -1
  93. data/app/themes/default/views/pwb/search/rent.html.erb +1 -1
  94. data/app/themes/default/views/pwb/sections/about_us.html.erb +8 -7
  95. data/app/themes/default/views/pwb/sections/contact_us.html.erb +40 -30
  96. data/app/themes/default/views/pwb/sections/static.html.erb +3 -20
  97. data/app/themes/default/views/pwb/welcome/_single_property_row.html.erb +1 -1
  98. data/app/themes/default/views/pwb/welcome/index.html.erb +7 -38
  99. data/app/themes/matt/views/layouts/pwb/application.html.erb +45 -0
  100. data/app/themes/matt/views/pwb/_footer.html.erb +60 -0
  101. data/app/themes/matt/views/pwb/_header.html.erb +105 -0
  102. data/app/themes/matt/views/pwb/search/buy.html.erb +65 -0
  103. data/app/themes/matt/views/pwb/welcome/index.html.erb +132 -0
  104. data/app/themes/vic/views/layouts/pwb/application.html.erb +94 -0
  105. data/app/themes/vic/views/pwb/_header.html.erb +100 -0
  106. data/app/themes/vic/views/pwb/props/_images_section_carousel.html.erb +43 -0
  107. data/app/themes/vic/views/pwb/props/show.html.erb +69 -0
  108. data/app/themes/vic/views/pwb/search/buy.html.erb +65 -0
  109. data/app/themes/vic/views/pwb/search/rent.html.erb +65 -0
  110. data/app/themes/vic/views/pwb/sections/_contact_us_form.html.erb +49 -0
  111. data/app/themes/vic/views/pwb/sections/contact_us.html.erb +56 -0
  112. data/app/themes/vic/views/pwb/welcome/_content_area_cols.html.erb +12 -0
  113. data/app/themes/vic/views/pwb/welcome/_single_property_row.html.erb +51 -0
  114. data/app/themes/vic/views/pwb/welcome/index.html.erb +27 -0
  115. data/app/views/devise/shared/_links.html.erb +1 -1
  116. data/app/views/layouts/pwb/admin_panel_error.html.erb +19 -0
  117. data/app/views/layouts/pwb/admin_panel_legacy_1.html.erb +21 -0
  118. data/app/views/layouts/pwb/squares.html.erb +72 -0
  119. data/app/views/pwb/_footer.html.erb +2 -6
  120. data/app/views/pwb/_header.html.erb +23 -25
  121. data/app/views/pwb/admin_panel/show_legacy_1.html.erb +3 -0
  122. data/app/views/pwb/custom_css/_berlin.css.erb +0 -67
  123. data/app/views/pwb/custom_css/_default.css.erb +0 -22
  124. data/app/views/pwb/custom_css/_shared.css.erb +4 -3
  125. data/app/views/pwb/custom_css/_vic.css.erb +10 -0
  126. data/app/views/pwb/props/_images_section_carousel.html.erb +1 -1
  127. data/app/views/pwb/search/_search_result_item.html.erb +1 -1
  128. data/app/views/pwb/squares/show_client.html.erb +26 -0
  129. data/app/views/pwb/squares/show_prop.html.erb +26 -0
  130. data/app/views/pwb/squares/vue.html.erb +1 -0
  131. data/config/client_setups/default.json +28 -27
  132. data/config/initializers/i18n_globalise.rb +4 -0
  133. data/config/locales/admin.en.yml +38 -7
  134. data/config/locales/admin.es.yml +60 -6
  135. data/config/locales/admin.pt.yml +474 -0
  136. data/config/locales/admin.ru.yml +49 -6
  137. data/config/locales/devise.it.yml +137 -0
  138. data/config/locales/en.yml +7 -7
  139. data/config/locales/it.yml +160 -0
  140. data/config/locales/pt.yml +2 -0
  141. data/config/locales/rails.it.yml +213 -0
  142. data/config/locales/tr.yml +36 -36
  143. data/config/locales/vi.yml +5 -5
  144. data/config/preset_styles/green_amber.json +23 -0
  145. data/config/preset_styles/purple_teal.json +23 -0
  146. data/config/preset_styles/red_light.json +18 -0
  147. data/config/routes.rb +35 -23
  148. data/db/example_images/carousel_villa_with_pool.jpg +0 -0
  149. data/db/example_images/flat_luxury_dining_area.jpg +0 -0
  150. data/db/example_images/flat_luxury_living_area.jpg +0 -0
  151. data/db/migrate/20161120103546_create_pwb_props.rb +3 -3
  152. data/db/migrate/20161122174847_create_pwb_sections.rb +9 -8
  153. data/db/migrate/20161128221919_create_pwb_clients.rb +1 -0
  154. data/db/migrate/20170315195413_add_extra_cols_to_pwb_sections.rb +7 -6
  155. data/db/migrate/20170716075456_create_pwb_pages.rb +23 -0
  156. data/db/migrate/20170716110121_translate_pages.rb +17 -0
  157. data/db/migrate/20170720183443_create_pwb_links.rb +29 -0
  158. data/db/migrate/20170720201601_translate_links.rb +13 -0
  159. data/db/migrate/20170915094326_create_pwb_page_contents.rb +17 -0
  160. data/db/migrate/20170917215533_add_page_part_key_to_pwb_contents.rb +7 -0
  161. data/db/migrate/20170919134945_add_block_key_to_pwb_content_photos.rb +5 -0
  162. data/db/migrate/20170923195321_create_pwb_contacts.rb +33 -0
  163. data/db/migrate/20171011212930_create_pwb_page_parts.rb +30 -0
  164. data/db/seeds/translations_es.rb +1 -87
  165. data/db/seeds/translations_it.rb +92 -0
  166. data/db/yml_seeds/agency_address.yml +8 -8
  167. data/db/yml_seeds/contacts.yml +13 -0
  168. data/db/yml_seeds/content_translations/en.yml +73 -0
  169. data/db/yml_seeds/content_translations/es.yml +74 -0
  170. data/db/yml_seeds/content_translations/it.yml +73 -0
  171. data/db/yml_seeds/content_translations/pt.yml +73 -0
  172. data/db/yml_seeds/{content/footer.yml → footer.yml} +0 -0
  173. data/db/yml_seeds/links.yml +389 -0
  174. data/db/yml_seeds/page_parts/ABOUT_PAGE_PARTS.md +5 -0
  175. data/db/yml_seeds/page_parts/about-us__content_html.yml +24 -0
  176. data/db/yml_seeds/page_parts/about-us__our_agency.yml +51 -0
  177. data/db/yml_seeds/page_parts/contact-us__content_html.yml +24 -0
  178. data/db/yml_seeds/page_parts/contact-us__form_and_map.yml +17 -0
  179. data/db/yml_seeds/page_parts/home__about_us_services.yml +85 -0
  180. data/db/yml_seeds/page_parts/home__content_html.yml +24 -0
  181. data/db/yml_seeds/page_parts/home__landing_hero.yml +51 -0
  182. data/db/yml_seeds/page_parts/legal__content_html.yml +24 -0
  183. data/db/yml_seeds/page_parts/privacy__content_html.yml +24 -0
  184. data/db/yml_seeds/page_parts/sell__content_html.yml +24 -0
  185. data/db/yml_seeds/pages/about.yml +11 -0
  186. data/db/yml_seeds/pages/buy.yml +23 -0
  187. data/db/yml_seeds/pages/contact.yml +12 -0
  188. data/db/yml_seeds/pages/home.yml +15 -0
  189. data/db/yml_seeds/pages/legal_notice.yml +11 -0
  190. data/db/yml_seeds/pages/privacy_policy.yml +11 -0
  191. data/db/yml_seeds/pages/rent.yml +15 -0
  192. data/db/yml_seeds/pages/sell.yml +13 -0
  193. data/db/yml_seeds/prop/flat_for_rent.yml +11 -11
  194. data/db/yml_seeds/prop/flat_for_rent_2.yml +57 -0
  195. data/db/yml_seeds/prop/flat_for_sale.yml +11 -12
  196. data/db/yml_seeds/prop/flat_for_sale_2.yml +56 -0
  197. data/db/yml_seeds/prop/villa_for_rent.yml +14 -14
  198. data/db/yml_seeds/prop/villa_for_sale.yml +15 -15
  199. data/db/yml_seeds/prop_spain/flat_for_rent.yml +58 -0
  200. data/db/yml_seeds/prop_spain/flat_for_sale.yml +58 -0
  201. data/db/yml_seeds/prop_spain/villa_for_rent.yml +58 -0
  202. data/db/yml_seeds/prop_spain/villa_for_sale.yml +59 -0
  203. data/db/yml_seeds/sections.yml +119 -119
  204. data/db/yml_seeds/{content → to_delete}/about_us.yml +0 -0
  205. data/db/yml_seeds/{content → to_delete}/carousel.yml +0 -0
  206. data/db/yml_seeds/{content → to_delete}/content_columns.yml +0 -0
  207. data/db/yml_seeds/to_delete/footer.yml +15 -0
  208. data/db/yml_seeds/{content → to_delete}/sell.yml +0 -0
  209. data/db/yml_seeds/{content → to_delete}/static.yml +0 -0
  210. data/db/yml_seeds/website.yml +2 -1
  211. data/lib/pwb/engine.rb +16 -2
  212. data/lib/pwb/pages_seeder.rb +190 -0
  213. data/lib/pwb/seeder.rb +56 -14
  214. data/lib/pwb/version.rb +1 -1
  215. data/lib/tasks/pwb_tasks.rake +19 -2
  216. data/spec/controllers/pwb/api/v1/propeties_controller_spec.rb +2 -2
  217. data/spec/controllers/pwb/welcome_controller_spec.rb +18 -5
  218. data/spec/dummy/config/initializers/assets.rb +9 -0
  219. data/spec/dummy/config/routes.rb +2 -0
  220. data/spec/dummy/config/secrets.yml +3 -0
  221. data/spec/dummy/db/migrate/20171201161323_create_property_web_scraper_import_hosts.property_web_scraper.rb +22 -0
  222. data/spec/dummy/db/migrate/20171201161324_create_property_web_scraper_listings.property_web_scraper.rb +84 -0
  223. data/spec/dummy/db/schema.rb +475 -398
  224. data/spec/factories/pwb_contacts.rb +5 -0
  225. data/spec/factories/pwb_contents.rb +3 -0
  226. data/spec/factories/pwb_links.rb +5 -0
  227. data/spec/factories/pwb_page_contents.rb +5 -0
  228. data/spec/factories/pwb_page_parts.rb +8 -0
  229. data/spec/factories/pwb_pages.rb +29 -0
  230. data/spec/factories/pwb_prop_photos.rb +11 -2
  231. data/spec/fixtures/mls/properties_interealty.json +1 -496
  232. data/spec/fixtures/params/bulk_create.json +3 -3
  233. data/spec/libraries/pwb/pages_seeder_spec.rb +56 -0
  234. data/spec/libraries/pwb/seeder_spec.rb +14 -10
  235. data/spec/models/pwb/contact_spec.rb +7 -0
  236. data/spec/models/pwb/link_spec.rb +7 -0
  237. data/spec/models/pwb/page_content_spec.rb +7 -0
  238. data/spec/models/pwb/page_part_spec.rb +7 -0
  239. data/spec/models/pwb/page_spec.rb +28 -0
  240. data/spec/models/pwb/website_spec.rb +10 -0
  241. data/spec/rails_helper.rb +1 -1
  242. data/spec/requests/pwb/themes_spec.rb +15 -10
  243. data/spec/views/pwb/application_layout.html.erb_spec.rb +28 -21
  244. data/spec/views/pwb/contact_us.html.erb_spec.rb +11 -0
  245. data/spec/views/pwb/welcome.html.erb_spec.rb +13 -9
  246. metadata +230 -244
  247. data/app/controllers/pwb/api/v1/cms_pages_controller.rb +0 -102
  248. data/app/controllers/pwb/comfy_controller.rb +0 -106
  249. data/app/models/pwb/cms_page_container.rb +0 -9
  250. data/app/models/pwb/section.rb +0 -35
  251. data/app/models/pwb/welcome.rb +0 -4
  252. data/app/resources/pwb/api/v1/cms_block_resource.rb +0 -11
  253. data/app/resources/pwb/api/v1/cms_page_resource.rb +0 -27
  254. data/app/themes/berlin/views/pwb/sections/about_us.html.erb +0 -59
  255. data/app/themes/berlin/views/pwb/sections/cms.html.erb +0 -34
  256. data/app/themes/berlin/views/pwb/sections/static.html.erb +0 -58
  257. data/app/views/pwb/search/_search_result_item_to_del.html.erb +0 -56
  258. data/config/cms_page_containers/about-us.json +0 -18
  259. data/config/cms_page_containers/about.json +0 -107
  260. data/config/cms_page_containers/landing.json +0 -19
  261. data/config/cms_page_containers/legal.json +0 -17
  262. data/config/cms_page_containers/sell.json +0 -96
  263. data/config/initializers/comfortable_mexican_sofa.rb +0 -142
  264. data/config/initializers/i18n.rb +0 -1
  265. data/db/cms_fixtures/cms/categories/pages.yml +0 -3
  266. data/db/cms_fixtures/cms/files/_rerenting-landing_framed.png.yml +0 -6
  267. data/db/cms_fixtures/cms/files/rerenting-landing_framed.png +0 -0
  268. data/db/cms_fixtures/cms/layouts/about-us/attributes.yml +0 -4
  269. data/db/cms_fixtures/cms/layouts/about-us/people/attributes.yml +0 -4
  270. data/db/cms_fixtures/cms/layouts/about-us/people/content.html +0 -55
  271. data/db/cms_fixtures/cms/layouts/about-us/services/attributes.yml +0 -4
  272. data/db/cms_fixtures/cms/layouts/about-us/services/content.html +0 -32
  273. data/db/cms_fixtures/cms/layouts/about-us/services/javascript.js +0 -0
  274. data/db/cms_fixtures/cms/layouts/about-us/services/stylesheet.css +0 -0
  275. data/db/cms_fixtures/cms/layouts/about-us/stylesheet.css +0 -0
  276. data/db/cms_fixtures/cms/layouts/default-layout/attributes.yml +0 -4
  277. data/db/cms_fixtures/cms/layouts/default-layout/content.html +0 -51
  278. data/db/cms_fixtures/cms/layouts/default-layout/javascript.js +0 -0
  279. data/db/cms_fixtures/cms/layouts/default-layout/stylesheet.css +0 -0
  280. data/db/cms_fixtures/cms/pages/index/about-us/attributes.yml +0 -8
  281. data/db/cms_fixtures/cms/pages/index/about-us/people/attributes.yml +0 -8
  282. data/db/cms_fixtures/cms/pages/index/about-us/people/de/attributes.yml +0 -8
  283. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_details_a.html +0 -1
  284. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_details_b.html +0 -1
  285. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_details_c.html +0 -1
  286. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_details_d.html +0 -1
  287. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_img_url_a.html +0 -1
  288. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_img_url_b.html +0 -1
  289. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_img_url_c.html +0 -1
  290. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_img_url_d.html +0 -1
  291. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_name_a.html +0 -1
  292. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_name_b.html +0 -1
  293. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_name_c.html +0 -1
  294. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_name_d.html +0 -1
  295. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_title_a.html +0 -1
  296. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_title_b.html +0 -1
  297. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_title_c.html +0 -1
  298. data/db/cms_fixtures/cms/pages/index/about-us/people/de/person_title_d.html +0 -1
  299. data/db/cms_fixtures/cms/pages/index/about-us/people/en/attributes.yml +0 -8
  300. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_details_a.html +0 -1
  301. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_details_b.html +0 -1
  302. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_details_c.html +0 -1
  303. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_details_d.html +0 -1
  304. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_img_url_a.html +0 -1
  305. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_img_url_b.html +0 -1
  306. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_img_url_c.html +0 -1
  307. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_img_url_d.html +0 -1
  308. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_name_a.html +0 -1
  309. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_name_b.html +0 -1
  310. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_name_c.html +0 -1
  311. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_name_d.html +0 -1
  312. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_title_a.html +0 -1
  313. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_title_b.html +0 -1
  314. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_title_c.html +0 -1
  315. data/db/cms_fixtures/cms/pages/index/about-us/people/en/person_title_d.html +0 -1
  316. data/db/cms_fixtures/cms/pages/index/about-us/people/es/attributes.yml +0 -8
  317. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_details_a.html +0 -1
  318. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_details_b.html +0 -1
  319. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_details_c.html +0 -1
  320. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_details_d.html +0 -1
  321. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_img_url_a.html +0 -1
  322. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_img_url_b.html +0 -1
  323. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_img_url_c.html +0 -1
  324. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_img_url_d.html +0 -1
  325. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_name_a.html +0 -1
  326. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_name_b.html +0 -1
  327. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_name_c.html +0 -1
  328. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_name_d.html +0 -1
  329. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_title_a.html +0 -1
  330. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_title_b.html +0 -1
  331. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_title_c.html +0 -1
  332. data/db/cms_fixtures/cms/pages/index/about-us/people/es/person_title_d.html +0 -1
  333. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/attributes.yml +0 -8
  334. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_details_a.html +0 -1
  335. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_details_b.html +0 -1
  336. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_details_c.html +0 -1
  337. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_details_d.html +0 -1
  338. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_name_a.html +0 -1
  339. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_name_b.html +0 -1
  340. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_name_c.html +0 -1
  341. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_name_d.html +0 -1
  342. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_title_a.html +0 -1
  343. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_title_b.html +0 -1
  344. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_title_c.html +0 -1
  345. data/db/cms_fixtures/cms/pages/index/about-us/people/pt/person_title_d.html +0 -1
  346. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/attributes.yml +0 -8
  347. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_details_a.html +0 -1
  348. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_details_b.html +0 -1
  349. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_details_c.html +0 -1
  350. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_details_d.html +0 -1
  351. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_img_url_a.html +0 -1
  352. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_img_url_b.html +0 -1
  353. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_img_url_c.html +0 -1
  354. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_img_url_d.html +0 -1
  355. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_name_a.html +0 -1
  356. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_name_b.html +0 -1
  357. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_name_c.html +0 -1
  358. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_name_d.html +0 -1
  359. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_title_a.html +0 -1
  360. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_title_b.html +0 -1
  361. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_title_c.html +0 -1
  362. data/db/cms_fixtures/cms/pages/index/about-us/people/ru/person_title_d.html +0 -1
  363. data/db/cms_fixtures/cms/pages/index/about-us/services/attributes.yml +0 -8
  364. data/db/cms_fixtures/cms/pages/index/about-us/services/content_a.html +0 -1
  365. data/db/cms_fixtures/cms/pages/index/about-us/services/content_b.html +0 -0
  366. data/db/cms_fixtures/cms/pages/index/about-us/services/content_c.html +0 -0
  367. data/db/cms_fixtures/cms/pages/index/about-us/services/de/attributes.yml +0 -8
  368. data/db/cms_fixtures/cms/pages/index/about-us/services/de/content_a.html +0 -1
  369. data/db/cms_fixtures/cms/pages/index/about-us/services/de/content_b.html +0 -1
  370. data/db/cms_fixtures/cms/pages/index/about-us/services/de/content_c.html +0 -1
  371. data/db/cms_fixtures/cms/pages/index/about-us/services/de/title_a.html +0 -1
  372. data/db/cms_fixtures/cms/pages/index/about-us/services/de/title_b.html +0 -1
  373. data/db/cms_fixtures/cms/pages/index/about-us/services/de/title_c.html +0 -1
  374. data/db/cms_fixtures/cms/pages/index/about-us/services/en/attributes.yml +0 -8
  375. data/db/cms_fixtures/cms/pages/index/about-us/services/en/content_a.html +0 -1
  376. data/db/cms_fixtures/cms/pages/index/about-us/services/en/content_b.html +0 -1
  377. data/db/cms_fixtures/cms/pages/index/about-us/services/en/content_c.html +0 -1
  378. data/db/cms_fixtures/cms/pages/index/about-us/services/en/title_a.html +0 -1
  379. data/db/cms_fixtures/cms/pages/index/about-us/services/en/title_b.html +0 -1
  380. data/db/cms_fixtures/cms/pages/index/about-us/services/en/title_c.html +0 -1
  381. data/db/cms_fixtures/cms/pages/index/about-us/services/es/attributes.yml +0 -8
  382. data/db/cms_fixtures/cms/pages/index/about-us/services/es/content_a.html +0 -1
  383. data/db/cms_fixtures/cms/pages/index/about-us/services/es/content_b.html +0 -1
  384. data/db/cms_fixtures/cms/pages/index/about-us/services/es/content_c.html +0 -1
  385. data/db/cms_fixtures/cms/pages/index/about-us/services/es/title_a.html +0 -1
  386. data/db/cms_fixtures/cms/pages/index/about-us/services/es/title_b.html +0 -1
  387. data/db/cms_fixtures/cms/pages/index/about-us/services/es/title_c.html +0 -1
  388. data/db/cms_fixtures/cms/pages/index/about-us/services/title_a.html +0 -1
  389. data/db/cms_fixtures/cms/pages/index/about-us/services/title_b.html +0 -0
  390. data/db/cms_fixtures/cms/pages/index/about-us/services/title_c.html +0 -0
  391. data/db/cms_fixtures/cms/pages/index/attributes.yml +0 -8
  392. data/db/cms_fixtures/cms/pages/index/content.html +0 -1
  393. data/db/cms_fixtures/cms/pages/index/title.html +0 -0
  394. data/db/cms_fixtures/cms/snippets/snippet1/attributes.yml +0 -3
  395. data/db/cms_fixtures/cms/snippets/snippet1/content.html +0 -1
  396. data/db/cms_fixtures/sample-site/categories/files.yml +0 -1
  397. data/db/cms_fixtures/sample-site/categories/pages.yml +0 -1
  398. data/db/cms_fixtures/sample-site/categories/snippets.yml +0 -1
  399. data/db/cms_fixtures/sample-site/files/_sample.jpg.yml +0 -5
  400. data/db/cms_fixtures/sample-site/files/sample.jpg +0 -0
  401. data/db/cms_fixtures/sample-site/layouts/default/attributes.yml +0 -1
  402. data/db/cms_fixtures/sample-site/layouts/default/content.html +0 -5
  403. data/db/cms_fixtures/sample-site/layouts/default/javascript.js +0 -1
  404. data/db/cms_fixtures/sample-site/layouts/default/nested/attributes.yml +0 -2
  405. data/db/cms_fixtures/sample-site/layouts/default/nested/content.haml +0 -3
  406. data/db/cms_fixtures/sample-site/layouts/default/nested/javascript.js +0 -1
  407. data/db/cms_fixtures/sample-site/layouts/default/nested/stylesheet.css +0 -1
  408. data/db/cms_fixtures/sample-site/layouts/default/stylesheet.css +0 -1
  409. data/db/cms_fixtures/sample-site/pages/index/attributes.yml +0 -6
  410. data/db/cms_fixtures/sample-site/pages/index/child/attributes.yml +0 -3
  411. data/db/cms_fixtures/sample-site/pages/index/child/left.haml +0 -1
  412. data/db/cms_fixtures/sample-site/pages/index/child/right.html +0 -1
  413. data/db/cms_fixtures/sample-site/pages/index/child/thumbnail.png +0 -0
  414. data/db/cms_fixtures/sample-site/pages/index/content.html +0 -2
  415. data/db/cms_fixtures/sample-site/snippets/default/attributes.yml +0 -4
  416. data/db/cms_fixtures/sample-site/snippets/default/content.html +0 -1
  417. data/db/migrate/20170315212222_translate_sections.rb +0 -15
  418. data/db/migrate/20170513221300_create_cms.rb +0 -133
  419. data/lib/pwb/cms_data_loader.rb +0 -38
  420. data/spec/dummy/log/development.log +0 -0
  421. data/spec/dummy/log/test.log +0 -0
  422. data/spec/dummy/public/uploads/pwb/content_photo/image/1/carousel_windows.jpg +0 -0
  423. data/spec/dummy/public/uploads/pwb/content_photo/image/2/carousel_deck_chair.jpg +0 -0
  424. data/spec/dummy/public/uploads/pwb/content_photo/image/3/carousel_grass.jpg +0 -0
  425. data/spec/dummy/public/uploads/pwb/content_photo/image/4/carousel_grass.jpg +0 -0
  426. data/spec/dummy/public/uploads/pwb/prop_photo/image/1/flat_balcony.jpg +0 -0
  427. data/spec/dummy/public/uploads/pwb/prop_photo/image/1/gdaje3atcct1gx2ngv9u.jpg +0 -0
  428. data/spec/dummy/public/uploads/pwb/prop_photo/image/1/new_villa.jpg +0 -0
  429. data/spec/dummy/public/uploads/pwb/prop_photo/image/2/flat_balcony.jpg +0 -0
  430. data/spec/dummy/public/uploads/pwb/prop_photo/image/2/kitchen_modern.jpg +0 -0
  431. data/spec/dummy/public/uploads/pwb/prop_photo/image/2/rxo23syongfydjpoizrd.jpg +0 -0
  432. data/spec/dummy/public/uploads/pwb/prop_photo/image/3/mansion_front.jpg +0 -0
  433. data/spec/dummy/public/uploads/pwb/prop_photo/image/3/vzlptgtccsk2d2ewp4id.jpg +0 -0
  434. data/spec/dummy/public/uploads/pwb/prop_photo/image/4/mansion_bedroom.jpg +0 -0
  435. data/spec/dummy/public/uploads/pwb/prop_photo/image/4/xwayprwnmmmhrzrgwvch.jpg +0 -0
  436. data/spec/dummy/public/uploads/pwb/prop_photo/image/5/flat_window.jpg +0 -0
  437. data/spec/dummy/public/uploads/pwb/prop_photo/image/5/ilxn2u37bak0v60u6f8q.jpg +0 -0
  438. data/spec/dummy/public/uploads/pwb/prop_photo/image/6/kitchen_classic.jpg +0 -0
  439. data/spec/dummy/public/uploads/pwb/prop_photo/image/7/flat_balcony.jpg +0 -0
  440. data/spec/dummy/public/uploads/pwb/prop_photo/image/8/lounge_cosy.jpg +0 -0
  441. data/spec/factories/pwb_sections.rb +0 -4
  442. data/spec/models/pwb/section_spec.rb +0 -11
@@ -1,3 +1,5 @@
1
+ # To reload from console:
2
+ # load "#{Pwb::Engine.root}/lib/pwb/seeder.rb"
1
3
  module Pwb
2
4
  class Seeder
3
5
  class << self
@@ -6,7 +8,6 @@ module Pwb
6
8
 
7
9
  def seed!
8
10
  I18n.locale = :en
9
-
10
11
  # unless ENV["RAILS_ENV"] == "test"
11
12
  # load File.join(Pwb::Engine.root, 'db', 'seeds', 'translations.rb')
12
13
  # end
@@ -20,28 +21,45 @@ module Pwb
20
21
  load File.join(Pwb::Engine.root, 'db', 'seeds', 'translations_ca.rb')
21
22
  end
22
23
 
23
- seed_sections 'sections.yml'
24
- seed_content 'content_columns.yml'
25
- seed_content 'carousel.yml'
26
- seed_content 'about_us.yml'
27
- seed_content 'static.yml'
24
+ # seed_sections 'sections.yml'
25
+ # seed_content 'content_columns.yml'
26
+ # seed_content 'carousel.yml'
27
+ # seed_content 'about_us.yml'
28
+ # seed_content 'static.yml'
28
29
  seed_content 'footer.yml'
29
- seed_content 'sell.yml'
30
+ # seed_content 'sell.yml'
30
31
  seed_agency 'agency.yml'
31
- seed_website 'website.yml'
32
32
  # need to seed website first so correct currency is used
33
+ seed_website 'website.yml'
34
+ # currency passed in for properties is ignored in favour
35
+ # of default website currency
33
36
  unless Pwb::Prop.count > 3
34
37
  seed_prop 'villa_for_sale.yml'
35
38
  seed_prop 'villa_for_rent.yml'
36
39
  seed_prop 'flat_for_sale.yml'
37
40
  seed_prop 'flat_for_rent.yml'
41
+ seed_prop 'flat_for_sale_2.yml'
42
+ seed_prop 'flat_for_rent_2.yml'
38
43
  end
39
44
  seed_field_keys 'field_keys.yml'
40
45
  seed_users 'users.yml'
46
+ seed_contacts 'contacts.yml'
47
+ # seed_pages
48
+ seed_links 'links.yml'
49
+
41
50
  end
42
51
 
43
52
  protected
44
53
 
54
+ def seed_contacts yml_file
55
+ contacts_yml = load_seed_yml yml_file
56
+ contacts_yml.each do |contact_yml|
57
+ unless Pwb::Contact.where(primary_email: contact_yml['email']).count > 0
58
+ Pwb::Contact.create!(contact_yml)
59
+ end
60
+ end
61
+ end
62
+
45
63
  def seed_users yml_file
46
64
  users_yml = load_seed_yml yml_file
47
65
  users_yml.each do |user_yml|
@@ -60,11 +78,35 @@ module Pwb
60
78
  end
61
79
  end
62
80
 
63
- def seed_sections yml_file
64
- sections_yml = load_seed_yml yml_file
65
- sections_yml.each do |single_section_yml|
66
- unless Pwb::Section.where(link_key: single_section_yml['link_key']).count > 0
67
- Pwb::Section.create!(single_section_yml)
81
+ def seed_links yml_file
82
+ links_yml = load_seed_yml yml_file
83
+ links_yml.each do |single_link_yml|
84
+ link_record = Pwb::Link.find_by_slug(single_link_yml['slug'])
85
+ # unless Pwb::Link.where(slug: single_link_yml['slug']).count > 0
86
+ unless link_record.present?
87
+ link_record = Pwb::Link.create!(single_link_yml)
88
+ end
89
+
90
+ # below sets the link title text from I18n translations
91
+ # because setting the value in links.yml for each language
92
+ # is not feasible
93
+ I18n.available_locales.each do |locale|
94
+ title_accessor = 'link_title_' + locale.to_s
95
+ # if link_title has not been set for this locale
96
+ if link_record.send(title_accessor).blank?
97
+ # if link is associated with a page
98
+ if single_link_yml['page_slug']
99
+ translation_key = 'navbar.' + single_link_yml['page_slug']
100
+ # get the I18n translation
101
+ title_value = I18n.t(translation_key, :locale => locale, :default => nil)
102
+ title_value = title_value || I18n.t(translation_key, :locale => :en, :default => 'Unknown')
103
+ end
104
+ # in case translation cannot be found or link not associated with a page
105
+ # take default link_title (English value)
106
+ title_value = title_value || link_record.link_title
107
+ # set title_value as link_title
108
+ link_record.update_attribute title_accessor, title_value
109
+ end
68
110
  end
69
111
  end
70
112
  end
@@ -114,7 +156,7 @@ module Pwb
114
156
  end
115
157
 
116
158
  def seed_content yml_file
117
- content_seed_file = Pwb::Engine.root.join('db', 'yml_seeds', 'content', yml_file)
159
+ content_seed_file = Pwb::Engine.root.join('db', 'yml_seeds', yml_file)
118
160
  content_yml = YAML.load_file(content_seed_file)
119
161
  # tag is used to group content for an admin page
120
162
  # key is camelcase (js style) - used client side to identify each item in a group of content
@@ -1,3 +1,3 @@
1
1
  module Pwb
2
- VERSION = '1.2.0'.freeze
2
+ VERSION = '1.3.0'.freeze
3
3
  end
@@ -3,16 +3,33 @@
3
3
  # # Task goes here
4
4
  # end
5
5
  require 'pwb/seeder'
6
- require 'pwb/cms_data_loader'
6
+ require 'pwb/pages_seeder'
7
7
  # from root of engine:
8
8
  # bundle exec rake app:pwb:db:seed
9
9
  # from spec/dummy folder or within an app using the engine:
10
10
  # bundle exec rake pwb:db:seed
11
11
  namespace :pwb do
12
12
  namespace :db do
13
- desc 'Seeds the database with Pwb defaults'
13
+ desc 'Seeds the database with all seed data.'
14
14
  task seed: [:environment] do
15
15
  Pwb::Seeder.seed!
16
+ Pwb::PagesSeeder.seed_page_parts!
17
+ Pwb::PagesSeeder.seed_page_basics!
18
+ # below need to have page_parts populated to work correctly
19
+ Pwb::PagesSeeder.seed_page_content_translations!
20
+ end
21
+
22
+ desc 'Seeds the database with seed data for I18n, properties and field_keys'
23
+ task seed_base: [:environment] do
24
+ Pwb::Seeder.seed!
25
+ end
26
+
27
+ desc 'Seeds the database with PropertyWebBuilder default page content seed data. Will override existing content.'
28
+ task seed_pages: [:environment] do
29
+ Pwb::PagesSeeder.seed_page_parts!
30
+ Pwb::PagesSeeder.seed_page_basics!
31
+ # below need to have page_parts populated to work correctly
32
+ Pwb::PagesSeeder.seed_page_content_translations!
16
33
  end
17
34
  end
18
35
  end
@@ -12,13 +12,13 @@ module Pwb
12
12
 
13
13
  describe 'bulk create' do
14
14
  it 'creates multiple properties' do
15
- propertiesJSON = {
15
+ bulk_create_params = {
16
16
  propertiesJSON: bulk_create_input
17
17
  }
18
18
 
19
19
 
20
20
  expect{
21
- post :bulk_create, params: propertiesJSON
21
+ post :bulk_create, params: bulk_create_params
22
22
  }.to change(Prop,:count).by(4)
23
23
  expect(response.status).to eq(200)
24
24
  expect(response.content_type).to eq('application/json')
@@ -3,6 +3,16 @@ require 'rails_helper'
3
3
  module Pwb
4
4
  RSpec.describe WelcomeController, type: :controller do
5
5
  routes { Pwb::Engine.routes }
6
+
7
+ before(:all) do
8
+ @page = Pwb::Page.find_by_slug "home"
9
+ unless @page.present?
10
+ @page = FactoryGirl.create(:pwb_page, slug: "home")
11
+ end
12
+ # TODO - figure out how to do below with FactoryGirl
13
+ # @page.set_fragment_html "test", "en", "<h2>Sell Your Property with Us</h2>"
14
+ end
15
+
6
16
  # This should return the minimal set of attributes required to create a valid
7
17
  # Welcome. As you add validations to Welcome, be sure to
8
18
  # adjust the attributes here as well.
@@ -24,11 +34,10 @@ module Pwb
24
34
  let(:valid_session) { {} }
25
35
 
26
36
  describe 'GET #index' do
27
- it 'assigns all carousel_items correctly' do
28
- carousel_content = Content.create! carousel_content_attributes
29
- get :index, params: {}, session: valid_session
30
- expect(assigns(:carousel_items)).to eq(Content.where(tag: "landing-carousel"))
31
- end
37
+ # it 'assigns all content_to_show correctly' do
38
+ # get :index, params: {}, session: valid_session
39
+ # expect(assigns(:content_to_show)).to eq([Content.where(page_part_key: "test").first.raw])
40
+ # end
32
41
  it 'renders correct template' do
33
42
  # welcome = Content.create! carousel_content_attributes
34
43
  expect(get(:index)).to render_template('pwb/welcome/index')
@@ -57,5 +66,9 @@ module Pwb
57
66
  # expect(assigns(:welcome)).to eq(welcome)
58
67
  # end
59
68
  # end
69
+ after(:all) do
70
+ @page.destroy
71
+ end
72
+
60
73
  end
61
74
  end
@@ -9,3 +9,12 @@ Rails.application.config.assets.version = '1.0'
9
9
  # Precompile additional assets.
10
10
  # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
11
  # Rails.application.config.assets.precompile += %w( search.js )
12
+
13
+ # PWB precompile assets are defined here
14
+ # /pwb/lib/pwb/engine.rb
15
+ # and there has not been an issue
16
+ # till I added "gem 'property_web_scraper', github: 'RealEstateWebTools/property_web_scraper' "
17
+ # to gemfile.
18
+ # Now get "Asset was not declared to be precompiled in production" error
19
+ # and need to add below to fix that:
20
+ Rails.application.config.assets.precompile += %w( pwb/themes/default.css )
@@ -1,6 +1,8 @@
1
1
  Rails.application.routes.draw do
2
2
  mount Pwb::Engine => '/'
3
3
 
4
+ mount PropertyWebScraper::Engine => '/io/'
5
+
4
6
  # comfy_route :cms_admin, :path => '/comfy-admin'
5
7
  # # Make sure this routeset is defined last
6
8
  # comfy_route :cms, :path => '/comfy', :sitemap => false
@@ -22,12 +22,14 @@ development:
22
22
  # export CLOUDINARY_URL=cloudinary://592946557213384:ZIrQT440GYVRbL66gCV9Iez3Z00@hiec5yj0n
23
23
  # if I run above, before running "rails s", below will pick it up
24
24
  cloudinary_url: <%= ENV['CLOUDINARY_URL'] %>
25
+ fb_instance_id: real-estate-data-40611
25
26
 
26
27
  test:
27
28
  aws_access_key_id: AKIAIVRMRSMB2VM7OXBQ
28
29
  aws_secret_access_key: yqTroN7GN1ToBlDB/ZsCa5MX0ukZ2OMARAjXDI32
29
30
  secret_key_base: 27fb695295ff6093a10dcf3f15db8fb9c5372aed7e687413f4958af516459407e431daed131c8bab52bffdf3697320d1c67e11f3282916faa9dc355c8c671d1c
30
31
  cloudinary_url: cloudinary://467322738548127:JFxvSGAvsARgEGXkLStap2BVtX0@hzhjmgohq
32
+ fb_instance_id: real-estate-data-40611
31
33
 
32
34
  # Do not keep production secrets in the repository,
33
35
  # instead read values from the environment.
@@ -37,3 +39,4 @@ production:
37
39
  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
38
40
  cloudinary_url: cloudinary://467322738548127:JFxvSGAvsARgEGXkLStap2BVtX0@hzhjmgohq
39
41
  secret_key_base: d9f2478510f560763f2a0951588282b7a59f82f48f8f503829c056c174eb42d7e160e3ecd3518f3a7316efaf3eb1b2eec1a77f326e85684129ec920b5636aa0a
42
+ fb_instance_id: real-estate-data-40611
@@ -0,0 +1,22 @@
1
+ # This migration comes from property_web_scraper (originally 20170628160331)
2
+ class CreatePropertyWebScraperImportHosts < ActiveRecord::Migration[5.0]
3
+ def change
4
+ create_table :property_web_scraper_import_hosts do |t|
5
+ t.integer :flags, default: 0, null: false
6
+ t.string :scraper_name
7
+ t.string :host
8
+ t.boolean :is_https
9
+ t.json :details, default: {}
10
+ t.string :slug
11
+ t.text :example_urls, array: true, default: []
12
+ t.text :invalid_urls, array: true, default: []
13
+ t.datetime :last_retrieval_at
14
+ t.string :valid_url_regex
15
+ t.string :pause_between_calls, default: "5.seconds"
16
+ t.string :stale_age, default: "1.day"
17
+ t.timestamps
18
+ end
19
+
20
+ add_index :property_web_scraper_import_hosts, :host, unique: true
21
+ end
22
+ end
@@ -0,0 +1,84 @@
1
+ # This migration comes from property_web_scraper (originally 20170628201113)
2
+ class CreatePropertyWebScraperListings < ActiveRecord::Migration[5.0]
3
+ def change
4
+ create_table :property_web_scraper_listings do |t|
5
+ t.integer :flags, default: 0, null: false
6
+ t.integer :area_unit, default: 0, null: false
7
+ t.string :reference
8
+ # -1 indicates value could not be retrieved
9
+ t.integer :year_construction, default: 0, null: false
10
+ t.integer :count_bedrooms, default: 0, null: false
11
+ t.float :count_bathrooms, default: 0, null: false
12
+ # turns out count_bathrooms in the US can be .5, 1.5 etc
13
+ # so need a float for above
14
+ t.integer :count_toilets, default: 0, null: false
15
+ t.integer :count_garages, default: 0, null: false
16
+ t.float :plot_area, default: 0, null: false
17
+ t.float :constructed_area, default: 0, null: false
18
+ t.integer :energy_rating
19
+ t.float :energy_performance
20
+ t.string :title
21
+ t.text :description
22
+ t.string :locale_code
23
+ # t.text details
24
+
25
+ # booleans used in scopes
26
+ t.boolean :furnished, default: false
27
+ t.boolean :sold, default: false
28
+ t.boolean :reserved, default: false
29
+
30
+ t.boolean :for_rent_short_term, default: false
31
+ t.boolean :for_rent_long_term, default: false
32
+ t.boolean :for_sale, default: false
33
+ t.boolean :for_rent, default: false
34
+
35
+ t.datetime :available_to_rent_from
36
+ t.datetime :available_to_rent_till
37
+
38
+ t.string :price_string
39
+ t.float :price_float
40
+ t.monetize :price_sale
41
+ # above will create below in schema.rb:
42
+ # t.integer "price_sale_cents", default: 0, null: false
43
+ # t.string "price_sale_currency", default: "EUR", null: false
44
+ t.monetize :price_rental
45
+
46
+ t.string :currency
47
+
48
+ t.string :address_string
49
+ t.string :street_number
50
+ t.string :street_name
51
+ t.string :street_address
52
+ t.string :postal_code
53
+ t.string :province
54
+ t.string :city
55
+ t.string :region
56
+ t.string :country
57
+ t.float :latitude
58
+ t.float :longitude
59
+
60
+ t.datetime :last_retrieved_at
61
+ # t.integer :import_host_id
62
+ t.string :import_host_slug
63
+ # for real estate agent ref:
64
+ t.integer :re_agent_id
65
+ t.string :import_url
66
+ t.json :import_history, default: {}
67
+
68
+ t.string :main_image_url
69
+ t.text :image_urls, array: true, default: []
70
+ t.text :related_urls, array: true, default: []
71
+ t.text :features, array: true, default: []
72
+ t.text :unknown_fields, array: true, default: []
73
+
74
+ t.timestamps
75
+ end
76
+
77
+ add_index :property_web_scraper_listings, :flags
78
+ add_index :property_web_scraper_listings, :price_float
79
+ add_index :property_web_scraper_listings, :price_rental_cents
80
+ add_index :property_web_scraper_listings, :price_sale_cents
81
+ add_index :property_web_scraper_listings, :reference
82
+ add_index :property_web_scraper_listings, :import_url
83
+ end
84
+ end
@@ -10,466 +10,543 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 20170513221300) do
13
+ ActiveRecord::Schema.define(version: 20171201161324) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "plpgsql"
17
17
 
18
- create_table "comfy_cms_blocks", force: :cascade do |t|
19
- t.string "identifier", null: false
20
- t.text "content"
21
- t.string "blockable_type"
22
- t.integer "blockable_id"
23
- t.datetime "created_at", null: false
24
- t.datetime "updated_at", null: false
25
- t.index ["blockable_id", "blockable_type"], name: "index_comfy_cms_blocks_on_blockable_id_and_blockable_type", using: :btree
26
- t.index ["blockable_type", "blockable_id"], name: "index_comfy_cms_blocks_on_blockable_type_and_blockable_id", using: :btree
27
- t.index ["identifier"], name: "index_comfy_cms_blocks_on_identifier", using: :btree
18
+ create_table "property_web_scraper_import_hosts", id: :serial, force: :cascade do |t|
19
+ t.integer "flags", default: 0, null: false
20
+ t.string "scraper_name"
21
+ t.string "host"
22
+ t.boolean "is_https"
23
+ t.json "details", default: {}
24
+ t.string "slug"
25
+ t.text "example_urls", default: [], array: true
26
+ t.text "invalid_urls", default: [], array: true
27
+ t.datetime "last_retrieval_at"
28
+ t.string "valid_url_regex"
29
+ t.string "pause_between_calls", default: "5.seconds"
30
+ t.string "stale_age", default: "1.day"
31
+ t.datetime "created_at", null: false
32
+ t.datetime "updated_at", null: false
33
+ t.index ["host"], name: "index_property_web_scraper_import_hosts_on_host", unique: true
28
34
  end
29
35
 
30
- create_table "comfy_cms_categories", force: :cascade do |t|
31
- t.integer "site_id", null: false
32
- t.string "label", null: false
33
- t.string "categorized_type", null: false
34
- t.index ["site_id", "categorized_type", "label"], name: "index_cms_categories_on_site_id_and_cat_type_and_label", unique: true, using: :btree
36
+ create_table "property_web_scraper_listings", id: :serial, force: :cascade do |t|
37
+ t.integer "flags", default: 0, null: false
38
+ t.integer "area_unit", default: 0, null: false
39
+ t.string "reference"
40
+ t.integer "year_construction", default: 0, null: false
41
+ t.integer "count_bedrooms", default: 0, null: false
42
+ t.float "count_bathrooms", default: 0.0, null: false
43
+ t.integer "count_toilets", default: 0, null: false
44
+ t.integer "count_garages", default: 0, null: false
45
+ t.float "plot_area", default: 0.0, null: false
46
+ t.float "constructed_area", default: 0.0, null: false
47
+ t.integer "energy_rating"
48
+ t.float "energy_performance"
49
+ t.string "title"
50
+ t.text "description"
51
+ t.string "locale_code"
52
+ t.boolean "furnished", default: false
53
+ t.boolean "sold", default: false
54
+ t.boolean "reserved", default: false
55
+ t.boolean "for_rent_short_term", default: false
56
+ t.boolean "for_rent_long_term", default: false
57
+ t.boolean "for_sale", default: false
58
+ t.boolean "for_rent", default: false
59
+ t.datetime "available_to_rent_from"
60
+ t.datetime "available_to_rent_till"
61
+ t.string "price_string"
62
+ t.float "price_float"
63
+ t.integer "price_sale_cents", default: 0, null: false
64
+ t.string "price_sale_currency", default: "EUR", null: false
65
+ t.integer "price_rental_cents", default: 0, null: false
66
+ t.string "price_rental_currency", default: "EUR", null: false
67
+ t.string "currency"
68
+ t.string "address_string"
69
+ t.string "street_number"
70
+ t.string "street_name"
71
+ t.string "street_address"
72
+ t.string "postal_code"
73
+ t.string "province"
74
+ t.string "city"
75
+ t.string "region"
76
+ t.string "country"
77
+ t.float "latitude"
78
+ t.float "longitude"
79
+ t.datetime "last_retrieved_at"
80
+ t.string "import_host_slug"
81
+ t.integer "re_agent_id"
82
+ t.string "import_url"
83
+ t.json "import_history", default: {}
84
+ t.string "main_image_url"
85
+ t.text "image_urls", default: [], array: true
86
+ t.text "related_urls", default: [], array: true
87
+ t.text "features", default: [], array: true
88
+ t.text "unknown_fields", default: [], array: true
89
+ t.datetime "created_at", null: false
90
+ t.datetime "updated_at", null: false
91
+ t.index ["flags"], name: "index_property_web_scraper_listings_on_flags"
92
+ t.index ["import_url"], name: "index_property_web_scraper_listings_on_import_url"
93
+ t.index ["price_float"], name: "index_property_web_scraper_listings_on_price_float"
94
+ t.index ["price_rental_cents"], name: "index_property_web_scraper_listings_on_price_rental_cents"
95
+ t.index ["price_sale_cents"], name: "index_property_web_scraper_listings_on_price_sale_cents"
96
+ t.index ["reference"], name: "index_property_web_scraper_listings_on_reference"
35
97
  end
36
98
 
37
- create_table "comfy_cms_categorizations", force: :cascade do |t|
38
- t.integer "category_id", null: false
39
- t.string "categorized_type", null: false
40
- t.integer "categorized_id", null: false
41
- t.index ["category_id", "categorized_type", "categorized_id"], name: "index_cms_categorizations_on_cat_id_and_catd_type_and_catd_id", unique: true, using: :btree
99
+ create_table "pwb_addresses", id: :serial, force: :cascade do |t|
100
+ t.float "longitude"
101
+ t.float "latitude"
102
+ t.string "street_number"
103
+ t.string "street_address"
104
+ t.string "postal_code"
105
+ t.string "city"
106
+ t.string "region"
107
+ t.string "country"
108
+ t.datetime "created_at", null: false
109
+ t.datetime "updated_at", null: false
42
110
  end
43
111
 
44
- create_table "comfy_cms_files", force: :cascade do |t|
45
- t.integer "site_id", null: false
46
- t.integer "block_id"
47
- t.string "label", null: false
48
- t.string "file_file_name", null: false
49
- t.string "file_content_type", null: false
50
- t.integer "file_file_size", null: false
51
- t.string "description", limit: 2048
52
- t.integer "position", default: 0, null: false
53
- t.datetime "created_at", null: false
54
- t.datetime "updated_at", null: false
55
- t.index ["site_id", "block_id"], name: "index_comfy_cms_files_on_site_id_and_block_id", using: :btree
56
- t.index ["site_id", "file_file_name"], name: "index_comfy_cms_files_on_site_id_and_file_file_name", using: :btree
57
- t.index ["site_id", "label"], name: "index_comfy_cms_files_on_site_id_and_label", using: :btree
58
- t.index ["site_id", "position"], name: "index_comfy_cms_files_on_site_id_and_position", using: :btree
112
+ create_table "pwb_agencies", id: :serial, force: :cascade do |t|
113
+ t.string "phone_number_primary"
114
+ t.string "phone_number_mobile"
115
+ t.string "phone_number_other"
116
+ t.string "analytics_id"
117
+ t.integer "analytics_id_type"
118
+ t.string "company_name"
119
+ t.string "display_name"
120
+ t.string "email_primary"
121
+ t.string "email_for_general_contact_form"
122
+ t.string "email_for_property_contact_form"
123
+ t.string "skype"
124
+ t.string "company_id"
125
+ t.integer "company_id_type"
126
+ t.string "url"
127
+ t.integer "primary_address_id"
128
+ t.integer "secondary_address_id"
129
+ t.integer "flags", default: 0, null: false
130
+ t.integer "payment_plan_id"
131
+ t.integer "site_template_id"
132
+ t.json "site_configuration", default: {}
133
+ t.text "available_locales", default: [], array: true
134
+ t.text "supported_locales", default: [], array: true
135
+ t.text "available_currencies", default: [], array: true
136
+ t.text "supported_currencies", default: [], array: true
137
+ t.string "default_client_locale"
138
+ t.string "default_admin_locale"
139
+ t.string "default_currency"
140
+ t.json "social_media", default: {}
141
+ t.json "details", default: {}
142
+ t.text "raw_css"
143
+ t.datetime "created_at", null: false
144
+ t.datetime "updated_at", null: false
145
+ t.string "theme_name"
59
146
  end
60
147
 
61
- create_table "comfy_cms_layouts", force: :cascade do |t|
62
- t.integer "site_id", null: false
63
- t.integer "parent_id"
64
- t.string "app_layout"
65
- t.string "label", null: false
66
- t.string "identifier", null: false
67
- t.text "content"
68
- t.text "css"
69
- t.text "js"
70
- t.integer "position", default: 0, null: false
71
- t.boolean "is_shared", default: false, null: false
72
- t.datetime "created_at", null: false
73
- t.datetime "updated_at", null: false
74
- t.index ["parent_id", "position"], name: "index_comfy_cms_layouts_on_parent_id_and_position", using: :btree
75
- t.index ["site_id", "identifier"], name: "index_comfy_cms_layouts_on_site_id_and_identifier", unique: true, using: :btree
148
+ create_table "pwb_clients", id: :serial, force: :cascade do |t|
149
+ t.string "first_names"
150
+ t.string "last_names"
151
+ t.string "client_title"
152
+ t.string "phone_number_primary"
153
+ t.string "phone_number_other"
154
+ t.string "fax"
155
+ t.string "nationality"
156
+ t.string "email"
157
+ t.string "skype"
158
+ t.string "documentation_id"
159
+ t.integer "documentation_type"
160
+ t.integer "user_id"
161
+ t.integer "address_id"
162
+ t.integer "flags", default: 0, null: false
163
+ t.json "details", default: {}
164
+ t.datetime "created_at", null: false
165
+ t.datetime "updated_at", null: false
166
+ t.index ["documentation_id"], name: "index_pwb_clients_on_documentation_id", unique: true
167
+ t.index ["email"], name: "index_pwb_clients_on_email", unique: true
168
+ t.index ["first_names", "last_names"], name: "index_pwb_clients_on_first_names_and_last_names"
76
169
  end
77
170
 
78
- create_table "comfy_cms_pages", force: :cascade do |t|
79
- t.integer "site_id", null: false
80
- t.integer "layout_id"
81
- t.integer "parent_id"
82
- t.integer "target_page_id"
83
- t.string "label", null: false
84
- t.string "slug"
85
- t.string "full_path", null: false
86
- t.text "content_cache"
87
- t.integer "position", default: 0, null: false
88
- t.integer "children_count", default: 0, null: false
89
- t.boolean "is_published", default: true, null: false
90
- t.boolean "is_shared", default: false, null: false
91
- t.datetime "created_at", null: false
92
- t.datetime "updated_at", null: false
93
- t.index ["parent_id", "position"], name: "index_comfy_cms_pages_on_parent_id_and_position", using: :btree
94
- t.index ["site_id", "full_path"], name: "index_comfy_cms_pages_on_site_id_and_full_path", using: :btree
171
+ create_table "pwb_contacts", force: :cascade do |t|
172
+ t.string "first_name"
173
+ t.string "last_name"
174
+ t.string "other_names"
175
+ t.integer "title", default: 0
176
+ t.string "primary_phone_number"
177
+ t.string "other_phone_number"
178
+ t.string "fax"
179
+ t.string "nationality"
180
+ t.string "primary_email"
181
+ t.string "other_email"
182
+ t.string "skype_id"
183
+ t.string "facebook_id"
184
+ t.string "linkedin_id"
185
+ t.string "twitter_id"
186
+ t.string "website"
187
+ t.string "documentation_id"
188
+ t.integer "documentation_type"
189
+ t.integer "user_id"
190
+ t.integer "primary_address_id"
191
+ t.integer "secondary_address_id"
192
+ t.integer "flags", default: 0, null: false
193
+ t.json "details", default: {}
194
+ t.datetime "created_at", null: false
195
+ t.datetime "updated_at", null: false
196
+ t.index ["documentation_id"], name: "index_pwb_contacts_on_documentation_id"
197
+ t.index ["first_name", "last_name"], name: "index_pwb_contacts_on_first_name_and_last_name"
198
+ t.index ["first_name"], name: "index_pwb_contacts_on_first_name"
199
+ t.index ["last_name"], name: "index_pwb_contacts_on_last_name"
200
+ t.index ["primary_email"], name: "index_pwb_contacts_on_primary_email"
201
+ t.index ["primary_phone_number"], name: "index_pwb_contacts_on_primary_phone_number"
202
+ t.index ["title"], name: "index_pwb_contacts_on_title"
95
203
  end
96
204
 
97
- create_table "comfy_cms_revisions", force: :cascade do |t|
98
- t.string "record_type", null: false
99
- t.integer "record_id", null: false
100
- t.text "data"
101
- t.datetime "created_at"
102
- t.index ["record_type", "record_id", "created_at"], name: "index_cms_revisions_on_rtype_and_rid_and_created_at", using: :btree
205
+ create_table "pwb_content_photos", id: :serial, force: :cascade do |t|
206
+ t.integer "content_id"
207
+ t.string "image"
208
+ t.string "description"
209
+ t.string "folder"
210
+ t.integer "file_size"
211
+ t.integer "sort_order"
212
+ t.datetime "created_at", null: false
213
+ t.datetime "updated_at", null: false
214
+ t.string "block_key"
215
+ t.index ["content_id"], name: "index_pwb_content_photos_on_content_id"
103
216
  end
104
217
 
105
- create_table "comfy_cms_sites", force: :cascade do |t|
106
- t.string "label", null: false
107
- t.string "identifier", null: false
108
- t.string "hostname", null: false
109
- t.string "path"
110
- t.string "locale", default: "en", null: false
111
- t.boolean "is_mirrored", default: false, null: false
112
- t.index ["hostname"], name: "index_comfy_cms_sites_on_hostname", using: :btree
113
- t.index ["is_mirrored"], name: "index_comfy_cms_sites_on_is_mirrored", using: :btree
218
+ create_table "pwb_content_translations", force: :cascade do |t|
219
+ t.integer "pwb_content_id", null: false
220
+ t.string "locale", null: false
221
+ t.datetime "created_at", null: false
222
+ t.datetime "updated_at", null: false
223
+ t.text "raw"
224
+ t.index ["locale"], name: "index_pwb_content_translations_on_locale"
225
+ t.index ["pwb_content_id"], name: "index_pwb_content_translations_on_pwb_content_id"
114
226
  end
115
227
 
116
- create_table "comfy_cms_snippets", force: :cascade do |t|
117
- t.integer "site_id", null: false
118
- t.string "label", null: false
119
- t.string "identifier", null: false
120
- t.text "content"
121
- t.integer "position", default: 0, null: false
122
- t.boolean "is_shared", default: false, null: false
123
- t.datetime "created_at", null: false
124
- t.datetime "updated_at", null: false
125
- t.index ["site_id", "identifier"], name: "index_comfy_cms_snippets_on_site_id_and_identifier", unique: true, using: :btree
126
- t.index ["site_id", "position"], name: "index_comfy_cms_snippets_on_site_id_and_position", using: :btree
228
+ create_table "pwb_contents", id: :serial, force: :cascade do |t|
229
+ t.string "key"
230
+ t.string "tag"
231
+ t.string "input_type"
232
+ t.string "status"
233
+ t.integer "last_updated_by_user_id"
234
+ t.integer "sort_order"
235
+ t.string "target_url"
236
+ t.datetime "created_at", null: false
237
+ t.datetime "updated_at", null: false
238
+ t.string "section_key"
239
+ t.string "page_part_key"
240
+ t.index ["key"], name: "index_pwb_contents_on_key", unique: true
127
241
  end
128
242
 
129
- create_table "pwb_addresses", force: :cascade do |t|
130
- t.float "longitude"
131
- t.float "latitude"
132
- t.string "street_number"
133
- t.string "street_address"
134
- t.string "postal_code"
135
- t.string "city"
136
- t.string "region"
137
- t.string "country"
138
- t.datetime "created_at", null: false
139
- t.datetime "updated_at", null: false
243
+ create_table "pwb_features", id: :serial, force: :cascade do |t|
244
+ t.string "feature_key"
245
+ t.integer "prop_id"
246
+ t.datetime "created_at", null: false
247
+ t.datetime "updated_at", null: false
248
+ t.index ["feature_key"], name: "index_pwb_features_on_feature_key"
140
249
  end
141
250
 
142
- create_table "pwb_agencies", force: :cascade do |t|
143
- t.string "phone_number_primary"
144
- t.string "phone_number_mobile"
145
- t.string "phone_number_other"
146
- t.string "analytics_id"
147
- t.integer "analytics_id_type"
148
- t.string "company_name"
149
- t.string "display_name"
150
- t.string "email_primary"
151
- t.string "email_for_general_contact_form"
152
- t.string "email_for_property_contact_form"
153
- t.string "skype"
154
- t.string "company_id"
155
- t.integer "company_id_type"
156
- t.string "url"
157
- t.integer "primary_address_id"
158
- t.integer "secondary_address_id"
159
- t.integer "flags", default: 0, null: false
160
- t.integer "payment_plan_id"
161
- t.integer "site_template_id"
162
- t.json "site_configuration", default: {}
163
- t.text "available_locales", default: [], array: true
164
- t.text "supported_locales", default: [], array: true
165
- t.text "available_currencies", default: [], array: true
166
- t.text "supported_currencies", default: [], array: true
167
- t.string "default_client_locale"
168
- t.string "default_admin_locale"
169
- t.string "default_currency"
170
- t.json "social_media", default: {}
171
- t.json "details", default: {}
172
- t.text "raw_css"
173
- t.datetime "created_at", null: false
174
- t.datetime "updated_at", null: false
175
- t.string "theme_name"
251
+ create_table "pwb_field_keys", id: :serial, force: :cascade do |t|
252
+ t.string "global_key"
253
+ t.string "tag"
254
+ t.boolean "visible", default: true
255
+ t.integer "props_count", default: 0, null: false
256
+ t.boolean "show_in_search_form", default: true
257
+ t.datetime "created_at", null: false
258
+ t.datetime "updated_at", null: false
259
+ t.index ["global_key"], name: "index_pwb_field_keys_on_global_key", unique: true
176
260
  end
177
261
 
178
- create_table "pwb_clients", force: :cascade do |t|
179
- t.string "first_names"
180
- t.string "last_names"
181
- t.string "client_title"
182
- t.string "phone_number_primary"
183
- t.string "phone_number_other"
184
- t.string "fax"
185
- t.string "nationality"
186
- t.string "email"
187
- t.string "skype"
188
- t.string "documentation_id"
189
- t.integer "documentation_type"
190
- t.integer "user_id"
191
- t.integer "address_id"
192
- t.integer "flags", default: 0, null: false
193
- t.json "details", default: {}
194
- t.datetime "created_at", null: false
195
- t.datetime "updated_at", null: false
196
- t.index ["documentation_id"], name: "index_pwb_clients_on_documentation_id", unique: true, using: :btree
197
- t.index ["email"], name: "index_pwb_clients_on_email", unique: true, using: :btree
198
- t.index ["first_names", "last_names"], name: "index_pwb_clients_on_first_names_and_last_names", using: :btree
262
+ create_table "pwb_link_translations", force: :cascade do |t|
263
+ t.integer "pwb_link_id", null: false
264
+ t.string "locale", null: false
265
+ t.datetime "created_at", null: false
266
+ t.datetime "updated_at", null: false
267
+ t.string "link_title", default: ""
268
+ t.index ["locale"], name: "index_pwb_link_translations_on_locale"
269
+ t.index ["pwb_link_id"], name: "index_pwb_link_translations_on_pwb_link_id"
199
270
  end
200
271
 
201
- create_table "pwb_content_photos", force: :cascade do |t|
202
- t.integer "content_id"
203
- t.string "image"
204
- t.string "description"
205
- t.string "folder"
206
- t.integer "file_size"
207
- t.integer "sort_order"
208
- t.datetime "created_at", null: false
209
- t.datetime "updated_at", null: false
210
- t.index ["content_id"], name: "index_pwb_content_photos_on_content_id", using: :btree
272
+ create_table "pwb_links", id: :serial, force: :cascade do |t|
273
+ t.string "slug"
274
+ t.string "parent_slug"
275
+ t.string "page_slug"
276
+ t.string "icon_class"
277
+ t.string "href_class"
278
+ t.string "href_target"
279
+ t.boolean "is_external", default: false
280
+ t.string "link_url"
281
+ t.string "link_path"
282
+ t.string "link_path_params"
283
+ t.boolean "visible", default: true
284
+ t.boolean "is_deletable", default: false
285
+ t.integer "flags", default: 0, null: false
286
+ t.integer "sort_order", default: 0
287
+ t.integer "placement", default: 0
288
+ t.datetime "created_at", null: false
289
+ t.datetime "updated_at", null: false
290
+ t.index ["flags"], name: "index_pwb_links_on_flags"
291
+ t.index ["page_slug"], name: "index_pwb_links_on_page_slug"
292
+ t.index ["placement"], name: "index_pwb_links_on_placement"
293
+ t.index ["slug"], name: "index_pwb_links_on_slug", unique: true
211
294
  end
212
295
 
213
- create_table "pwb_content_translations", force: :cascade do |t|
214
- t.integer "pwb_content_id", null: false
215
- t.string "locale", null: false
216
- t.datetime "created_at", null: false
217
- t.datetime "updated_at", null: false
218
- t.text "raw"
219
- t.index ["locale"], name: "index_pwb_content_translations_on_locale", using: :btree
220
- t.index ["pwb_content_id"], name: "index_pwb_content_translations_on_pwb_content_id", using: :btree
296
+ create_table "pwb_messages", id: :serial, force: :cascade do |t|
297
+ t.string "title"
298
+ t.text "content"
299
+ t.integer "client_id"
300
+ t.string "origin_ip"
301
+ t.string "user_agent"
302
+ t.float "longitude"
303
+ t.float "latitude"
304
+ t.string "locale"
305
+ t.string "host"
306
+ t.string "url"
307
+ t.boolean "delivery_success", default: false
308
+ t.string "delivery_email"
309
+ t.string "origin_email"
310
+ t.datetime "created_at", null: false
311
+ t.datetime "updated_at", null: false
221
312
  end
222
313
 
223
- create_table "pwb_contents", force: :cascade do |t|
224
- t.string "key"
225
- t.string "tag"
226
- t.string "input_type"
227
- t.string "status"
228
- t.integer "last_updated_by_user_id"
229
- t.integer "sort_order"
230
- t.string "target_url"
231
- t.datetime "created_at", null: false
232
- t.datetime "updated_at", null: false
233
- t.string "section_key"
234
- t.index ["key"], name: "index_pwb_contents_on_key", unique: true, using: :btree
314
+ create_table "pwb_page_contents", force: :cascade do |t|
315
+ t.boolean "is_rails_part", default: false
316
+ t.string "page_part_key"
317
+ t.string "label"
318
+ t.integer "sort_order"
319
+ t.boolean "visible_on_page", default: true
320
+ t.bigint "page_id"
321
+ t.bigint "content_id"
322
+ t.datetime "created_at", null: false
323
+ t.datetime "updated_at", null: false
324
+ t.index ["content_id"], name: "index_pwb_page_contents_on_content_id"
325
+ t.index ["page_id"], name: "index_pwb_page_contents_on_page_id"
235
326
  end
236
327
 
237
- create_table "pwb_features", force: :cascade do |t|
238
- t.string "feature_key"
239
- t.integer "prop_id"
240
- t.datetime "created_at", null: false
241
- t.datetime "updated_at", null: false
242
- t.index ["feature_key"], name: "index_pwb_features_on_feature_key", using: :btree
328
+ create_table "pwb_page_parts", force: :cascade do |t|
329
+ t.boolean "is_rails_part", default: false
330
+ t.boolean "show_in_editor", default: true
331
+ t.integer "order_in_editor"
332
+ t.string "page_part_key"
333
+ t.string "page_slug"
334
+ t.text "template"
335
+ t.json "editor_setup", default: {}
336
+ t.json "block_contents", default: {}
337
+ t.string "theme_name"
338
+ t.string "locale"
339
+ t.integer "flags", default: 0, null: false
340
+ t.datetime "created_at", null: false
341
+ t.datetime "updated_at", null: false
342
+ t.index ["page_part_key", "page_slug"], name: "index_pwb_page_parts_on_page_part_key_and_page_slug"
343
+ t.index ["page_part_key"], name: "index_pwb_page_parts_on_page_part_key"
344
+ t.index ["page_slug"], name: "index_pwb_page_parts_on_page_slug"
243
345
  end
244
346
 
245
- create_table "pwb_field_keys", force: :cascade do |t|
246
- t.string "global_key"
247
- t.string "tag"
248
- t.boolean "visible", default: true
249
- t.integer "props_count", default: 0, null: false
250
- t.boolean "show_in_search_form", default: true
251
- t.datetime "created_at", null: false
252
- t.datetime "updated_at", null: false
253
- t.index ["global_key"], name: "index_pwb_field_keys_on_global_key", unique: true, using: :btree
347
+ create_table "pwb_page_translations", force: :cascade do |t|
348
+ t.integer "pwb_page_id", null: false
349
+ t.string "locale", null: false
350
+ t.datetime "created_at", null: false
351
+ t.datetime "updated_at", null: false
352
+ t.text "raw_html", default: ""
353
+ t.string "page_title", default: ""
354
+ t.string "link_title", default: ""
355
+ t.index ["locale"], name: "index_pwb_page_translations_on_locale"
356
+ t.index ["pwb_page_id"], name: "index_pwb_page_translations_on_pwb_page_id"
254
357
  end
255
358
 
256
- create_table "pwb_messages", force: :cascade do |t|
257
- t.string "title"
258
- t.text "content"
259
- t.integer "client_id"
260
- t.string "origin_ip"
261
- t.string "user_agent"
262
- t.float "longitude"
263
- t.float "latitude"
264
- t.string "locale"
265
- t.string "host"
266
- t.string "url"
267
- t.boolean "delivery_success", default: false
268
- t.string "delivery_email"
269
- t.string "origin_email"
270
- t.datetime "created_at", null: false
271
- t.datetime "updated_at", null: false
359
+ create_table "pwb_pages", id: :serial, force: :cascade do |t|
360
+ t.string "slug"
361
+ t.string "setup_id"
362
+ t.boolean "visible", default: false
363
+ t.integer "last_updated_by_user_id"
364
+ t.integer "flags", default: 0, null: false
365
+ t.json "details", default: {}
366
+ t.integer "sort_order_top_nav", default: 0
367
+ t.integer "sort_order_footer", default: 0
368
+ t.boolean "show_in_top_nav", default: false
369
+ t.boolean "show_in_footer", default: false
370
+ t.datetime "created_at", null: false
371
+ t.datetime "updated_at", null: false
372
+ t.index ["flags"], name: "index_pwb_pages_on_flags"
373
+ t.index ["show_in_footer"], name: "index_pwb_pages_on_show_in_footer"
374
+ t.index ["show_in_top_nav"], name: "index_pwb_pages_on_show_in_top_nav"
375
+ t.index ["slug"], name: "index_pwb_pages_on_slug", unique: true
272
376
  end
273
377
 
274
- create_table "pwb_prop_photos", force: :cascade do |t|
275
- t.integer "prop_id"
276
- t.string "image"
277
- t.string "description"
278
- t.string "folder"
279
- t.integer "file_size"
280
- t.integer "sort_order"
281
- t.datetime "created_at", null: false
282
- t.datetime "updated_at", null: false
283
- t.index ["prop_id"], name: "index_pwb_prop_photos_on_prop_id", using: :btree
378
+ create_table "pwb_prop_photos", id: :serial, force: :cascade do |t|
379
+ t.integer "prop_id"
380
+ t.string "image"
381
+ t.string "description"
382
+ t.string "folder"
383
+ t.integer "file_size"
384
+ t.integer "sort_order"
385
+ t.datetime "created_at", null: false
386
+ t.datetime "updated_at", null: false
387
+ t.index ["prop_id"], name: "index_pwb_prop_photos_on_prop_id"
284
388
  end
285
389
 
286
390
  create_table "pwb_prop_translations", force: :cascade do |t|
287
- t.integer "pwb_prop_id", null: false
288
- t.string "locale", null: false
289
- t.datetime "created_at", null: false
290
- t.datetime "updated_at", null: false
291
- t.string "title", default: ""
292
- t.text "description", default: ""
293
- t.index ["locale"], name: "index_pwb_prop_translations_on_locale", using: :btree
294
- t.index ["pwb_prop_id"], name: "index_pwb_prop_translations_on_pwb_prop_id", using: :btree
391
+ t.integer "pwb_prop_id", null: false
392
+ t.string "locale", null: false
393
+ t.datetime "created_at", null: false
394
+ t.datetime "updated_at", null: false
395
+ t.string "title", default: ""
396
+ t.text "description", default: ""
397
+ t.index ["locale"], name: "index_pwb_prop_translations_on_locale"
398
+ t.index ["pwb_prop_id"], name: "index_pwb_prop_translations_on_pwb_prop_id"
295
399
  end
296
400
 
297
- create_table "pwb_props", force: :cascade do |t|
298
- t.string "reference"
299
- t.integer "year_construction", default: 0, null: false
300
- t.integer "count_bedrooms", default: 0, null: false
301
- t.float "count_bathrooms", default: 0.0, null: false
302
- t.integer "count_toilets", default: 0, null: false
303
- t.integer "count_garages", default: 0, null: false
304
- t.float "plot_area", default: 0.0, null: false
305
- t.float "constructed_area", default: 0.0, null: false
306
- t.integer "energy_rating"
307
- t.float "energy_performance"
308
- t.integer "flags", default: 0, null: false
309
- t.boolean "furnished", default: false
310
- t.boolean "sold", default: false
311
- t.boolean "reserved", default: false
312
- t.boolean "highlighted", default: false
313
- t.boolean "archived", default: false
314
- t.boolean "visible", default: false
315
- t.boolean "for_rent_short_term", default: false
316
- t.boolean "for_rent_long_term", default: false
317
- t.boolean "for_sale", default: false
318
- t.boolean "hide_map", default: false
319
- t.boolean "obscure_map", default: false
320
- t.boolean "portals_enabled", default: false
401
+ create_table "pwb_props", id: :serial, force: :cascade do |t|
402
+ t.string "reference"
403
+ t.integer "year_construction", default: 0, null: false
404
+ t.integer "count_bedrooms", default: 0, null: false
405
+ t.float "count_bathrooms", default: 0.0, null: false
406
+ t.integer "count_toilets", default: 0, null: false
407
+ t.integer "count_garages", default: 0, null: false
408
+ t.float "plot_area", default: 0.0, null: false
409
+ t.float "constructed_area", default: 0.0, null: false
410
+ t.integer "energy_rating"
411
+ t.float "energy_performance"
412
+ t.integer "flags", default: 0, null: false
413
+ t.boolean "furnished", default: false
414
+ t.boolean "sold", default: false
415
+ t.boolean "reserved", default: false
416
+ t.boolean "highlighted", default: false
417
+ t.boolean "archived", default: false
418
+ t.boolean "visible", default: false
419
+ t.boolean "for_rent_short_term", default: false
420
+ t.boolean "for_rent_long_term", default: false
421
+ t.boolean "for_sale", default: false
422
+ t.boolean "hide_map", default: false
423
+ t.boolean "obscure_map", default: false
424
+ t.boolean "portals_enabled", default: false
321
425
  t.datetime "deleted_at"
322
426
  t.datetime "active_from"
323
427
  t.datetime "available_to_rent_from"
324
428
  t.datetime "available_to_rent_till"
325
- t.bigint "price_sale_current_cents", default: 0, null: false
326
- t.string "price_sale_current_currency", default: "EUR", null: false
327
- t.bigint "price_sale_original_cents", default: 0, null: false
328
- t.string "price_sale_original_currency", default: "EUR", null: false
329
- t.integer "price_rental_monthly_current_cents", default: 0, null: false
330
- t.string "price_rental_monthly_current_currency", default: "EUR", null: false
331
- t.integer "price_rental_monthly_original_cents", default: 0, null: false
332
- t.string "price_rental_monthly_original_currency", default: "EUR", null: false
333
- t.integer "price_rental_monthly_low_season_cents", default: 0, null: false
334
- t.string "price_rental_monthly_low_season_currency", default: "EUR", null: false
335
- t.integer "price_rental_monthly_high_season_cents", default: 0, null: false
336
- t.string "price_rental_monthly_high_season_currency", default: "EUR", null: false
337
- t.integer "price_rental_monthly_standard_season_cents", default: 0, null: false
338
- t.string "price_rental_monthly_standard_season_currency", default: "EUR", null: false
339
- t.integer "commission_cents", default: 0, null: false
340
- t.string "commission_currency", default: "EUR", null: false
341
- t.integer "service_charge_yearly_cents", default: 0, null: false
342
- t.string "service_charge_yearly_currency", default: "EUR", null: false
343
- t.integer "price_rental_monthly_for_search_cents", default: 0, null: false
344
- t.string "price_rental_monthly_for_search_currency", default: "EUR", null: false
345
- t.string "currency"
346
- t.string "prop_origin_key", default: "", null: false
347
- t.string "prop_state_key", default: "", null: false
348
- t.string "prop_type_key", default: "", null: false
349
- t.string "street_number"
350
- t.string "street_name"
351
- t.string "street_address"
352
- t.string "postal_code"
353
- t.string "province"
354
- t.string "city"
355
- t.string "region"
356
- t.string "country"
357
- t.float "latitude"
358
- t.float "longitude"
359
- t.datetime "created_at", null: false
360
- t.datetime "updated_at", null: false
361
- t.integer "area_unit", default: 0
362
- t.index ["archived"], name: "index_pwb_props_on_archived", using: :btree
363
- t.index ["flags"], name: "index_pwb_props_on_flags", using: :btree
364
- t.index ["for_rent_long_term"], name: "index_pwb_props_on_for_rent_long_term", using: :btree
365
- t.index ["for_rent_short_term"], name: "index_pwb_props_on_for_rent_short_term", using: :btree
366
- t.index ["for_sale"], name: "index_pwb_props_on_for_sale", using: :btree
367
- t.index ["highlighted"], name: "index_pwb_props_on_highlighted", using: :btree
368
- t.index ["latitude", "longitude"], name: "index_pwb_props_on_latitude_and_longitude", using: :btree
369
- t.index ["price_rental_monthly_current_cents"], name: "index_pwb_props_on_price_rental_monthly_current_cents", using: :btree
370
- t.index ["price_sale_current_cents"], name: "index_pwb_props_on_price_sale_current_cents", using: :btree
371
- t.index ["reference"], name: "index_pwb_props_on_reference", unique: true, using: :btree
372
- t.index ["visible"], name: "index_pwb_props_on_visible", using: :btree
373
- end
374
-
375
- create_table "pwb_section_translations", force: :cascade do |t|
376
- t.integer "pwb_section_id", null: false
377
- t.string "locale", null: false
378
- t.datetime "created_at", null: false
379
- t.datetime "updated_at", null: false
380
- t.string "page_title", default: ""
381
- t.string "link_title", default: ""
382
- t.index ["locale"], name: "index_pwb_section_translations_on_locale", using: :btree
383
- t.index ["pwb_section_id"], name: "index_pwb_section_translations_on_pwb_section_id", using: :btree
384
- end
385
-
386
- create_table "pwb_sections", force: :cascade do |t|
387
- t.string "link_key"
388
- t.string "link_path"
389
- t.integer "sort_order"
390
- t.boolean "visible"
391
- t.datetime "created_at", null: false
392
- t.datetime "updated_at", null: false
393
- t.integer "flags", default: 0, null: false
394
- t.json "details", default: {}
395
- t.boolean "is_page", default: false
396
- t.boolean "show_in_top_nav", default: false
397
- t.boolean "show_in_footer", default: false
398
- t.string "key"
399
- t.index ["link_key"], name: "index_pwb_sections_on_link_key", unique: true, using: :btree
429
+ t.bigint "price_sale_current_cents", default: 0, null: false
430
+ t.string "price_sale_current_currency", default: "EUR", null: false
431
+ t.bigint "price_sale_original_cents", default: 0, null: false
432
+ t.string "price_sale_original_currency", default: "EUR", null: false
433
+ t.integer "price_rental_monthly_current_cents", default: 0, null: false
434
+ t.string "price_rental_monthly_current_currency", default: "EUR", null: false
435
+ t.integer "price_rental_monthly_original_cents", default: 0, null: false
436
+ t.string "price_rental_monthly_original_currency", default: "EUR", null: false
437
+ t.integer "price_rental_monthly_low_season_cents", default: 0, null: false
438
+ t.string "price_rental_monthly_low_season_currency", default: "EUR", null: false
439
+ t.integer "price_rental_monthly_high_season_cents", default: 0, null: false
440
+ t.string "price_rental_monthly_high_season_currency", default: "EUR", null: false
441
+ t.integer "price_rental_monthly_standard_season_cents", default: 0, null: false
442
+ t.string "price_rental_monthly_standard_season_currency", default: "EUR", null: false
443
+ t.integer "commission_cents", default: 0, null: false
444
+ t.string "commission_currency", default: "EUR", null: false
445
+ t.integer "service_charge_yearly_cents", default: 0, null: false
446
+ t.string "service_charge_yearly_currency", default: "EUR", null: false
447
+ t.integer "price_rental_monthly_for_search_cents", default: 0, null: false
448
+ t.string "price_rental_monthly_for_search_currency", default: "EUR", null: false
449
+ t.string "currency"
450
+ t.string "prop_origin_key", default: "", null: false
451
+ t.string "prop_state_key", default: "", null: false
452
+ t.string "prop_type_key", default: "", null: false
453
+ t.string "street_number"
454
+ t.string "street_name"
455
+ t.string "street_address"
456
+ t.string "postal_code"
457
+ t.string "province"
458
+ t.string "city"
459
+ t.string "region"
460
+ t.string "country"
461
+ t.float "latitude"
462
+ t.float "longitude"
463
+ t.datetime "created_at", null: false
464
+ t.datetime "updated_at", null: false
465
+ t.integer "area_unit", default: 0
466
+ t.index ["archived"], name: "index_pwb_props_on_archived"
467
+ t.index ["flags"], name: "index_pwb_props_on_flags"
468
+ t.index ["for_rent_long_term"], name: "index_pwb_props_on_for_rent_long_term"
469
+ t.index ["for_rent_short_term"], name: "index_pwb_props_on_for_rent_short_term"
470
+ t.index ["for_sale"], name: "index_pwb_props_on_for_sale"
471
+ t.index ["highlighted"], name: "index_pwb_props_on_highlighted"
472
+ t.index ["latitude", "longitude"], name: "index_pwb_props_on_latitude_and_longitude"
473
+ t.index ["price_rental_monthly_current_cents"], name: "index_pwb_props_on_price_rental_monthly_current_cents"
474
+ t.index ["price_sale_current_cents"], name: "index_pwb_props_on_price_sale_current_cents"
475
+ t.index ["reference"], name: "index_pwb_props_on_reference", unique: true
476
+ t.index ["visible"], name: "index_pwb_props_on_visible"
400
477
  end
401
478
 
402
- create_table "pwb_users", force: :cascade do |t|
403
- t.string "email", default: "", null: false
404
- t.string "encrypted_password", default: "", null: false
405
- t.string "reset_password_token"
479
+ create_table "pwb_users", id: :serial, force: :cascade do |t|
480
+ t.string "email", default: "", null: false
481
+ t.string "encrypted_password", default: "", null: false
482
+ t.string "reset_password_token"
406
483
  t.datetime "reset_password_sent_at"
407
484
  t.datetime "remember_created_at"
408
- t.integer "sign_in_count", default: 0, null: false
485
+ t.integer "sign_in_count", default: 0, null: false
409
486
  t.datetime "current_sign_in_at"
410
487
  t.datetime "last_sign_in_at"
411
- t.string "current_sign_in_ip"
412
- t.string "last_sign_in_ip"
413
- t.string "confirmation_token"
488
+ t.string "current_sign_in_ip"
489
+ t.string "last_sign_in_ip"
490
+ t.string "confirmation_token"
414
491
  t.datetime "confirmed_at"
415
492
  t.datetime "confirmation_sent_at"
416
- t.string "unconfirmed_email"
417
- t.integer "failed_attempts", default: 0, null: false
418
- t.string "unlock_token"
493
+ t.string "unconfirmed_email"
494
+ t.integer "failed_attempts", default: 0, null: false
495
+ t.string "unlock_token"
419
496
  t.datetime "locked_at"
420
- t.string "authentication_token"
421
- t.boolean "admin", default: false
422
- t.string "first_names"
423
- t.string "last_names"
424
- t.string "skype"
425
- t.string "phone_number_primary"
426
- t.string "default_client_locale"
427
- t.string "default_admin_locale"
428
- t.string "default_currency"
429
- t.datetime "created_at", null: false
430
- t.datetime "updated_at", null: false
431
- t.index ["confirmation_token"], name: "index_pwb_users_on_confirmation_token", unique: true, using: :btree
432
- t.index ["email"], name: "index_pwb_users_on_email", unique: true, using: :btree
433
- t.index ["reset_password_token"], name: "index_pwb_users_on_reset_password_token", unique: true, using: :btree
497
+ t.string "authentication_token"
498
+ t.boolean "admin", default: false
499
+ t.string "first_names"
500
+ t.string "last_names"
501
+ t.string "skype"
502
+ t.string "phone_number_primary"
503
+ t.string "default_client_locale"
504
+ t.string "default_admin_locale"
505
+ t.string "default_currency"
506
+ t.datetime "created_at", null: false
507
+ t.datetime "updated_at", null: false
508
+ t.index ["confirmation_token"], name: "index_pwb_users_on_confirmation_token", unique: true
509
+ t.index ["email"], name: "index_pwb_users_on_email", unique: true
510
+ t.index ["reset_password_token"], name: "index_pwb_users_on_reset_password_token", unique: true
434
511
  end
435
512
 
436
- create_table "pwb_websites", force: :cascade do |t|
437
- t.string "analytics_id"
438
- t.integer "analytics_id_type"
439
- t.string "company_display_name"
440
- t.string "email_for_general_contact_form"
441
- t.string "email_for_property_contact_form"
442
- t.integer "contact_address_id"
443
- t.integer "flags", default: 0, null: false
444
- t.string "theme_name"
445
- t.string "google_font_name"
446
- t.json "configuration", default: {}
447
- t.json "style_variables_for_theme", default: {}
448
- t.text "sale_price_options_from", default: ["", "25,000", "50,000", "75,000", "100,000", "150,000", "250,000", "500,000", "1,000,000", "2,000,000", "5,000,000", "10,000,000"], array: true
449
- t.text "sale_price_options_till", default: ["", "25,000", "50,000", "75,000", "100,000", "150,000", "250,000", "500,000", "1,000,000", "2,000,000", "5,000,000", "10,000,000"], array: true
450
- t.text "rent_price_options_from", default: ["", "250", "500", "750", "1,000", "1,500", "2,500", "5,000"], array: true
451
- t.text "rent_price_options_till", default: ["", "250", "500", "750", "1,000", "1,500", "2,500", "5,000"], array: true
452
- t.text "supported_locales", default: ["en-UK"], array: true
453
- t.text "supported_currencies", default: [], array: true
454
- t.string "default_client_locale", default: "en-UK"
455
- t.string "default_admin_locale", default: "en-UK"
456
- t.string "default_currency", default: "EUR"
457
- t.integer "default_area_unit", default: 0
458
- t.json "social_media", default: {}
459
- t.text "raw_css"
460
- t.datetime "created_at", null: false
461
- t.datetime "updated_at", null: false
513
+ create_table "pwb_websites", id: :serial, force: :cascade do |t|
514
+ t.string "analytics_id"
515
+ t.integer "analytics_id_type"
516
+ t.string "company_display_name"
517
+ t.string "email_for_general_contact_form"
518
+ t.string "email_for_property_contact_form"
519
+ t.integer "contact_address_id"
520
+ t.integer "flags", default: 0, null: false
521
+ t.string "theme_name"
522
+ t.string "google_font_name"
523
+ t.json "configuration", default: {}
524
+ t.json "style_variables_for_theme", default: {}
525
+ t.text "sale_price_options_from", default: ["", "25,000", "50,000", "75,000", "100,000", "150,000", "250,000", "500,000", "1,000,000", "2,000,000", "5,000,000", "10,000,000"], array: true
526
+ t.text "sale_price_options_till", default: ["", "25,000", "50,000", "75,000", "100,000", "150,000", "250,000", "500,000", "1,000,000", "2,000,000", "5,000,000", "10,000,000"], array: true
527
+ t.text "rent_price_options_from", default: ["", "250", "500", "750", "1,000", "1,500", "2,500", "5,000"], array: true
528
+ t.text "rent_price_options_till", default: ["", "250", "500", "750", "1,000", "1,500", "2,500", "5,000"], array: true
529
+ t.text "supported_locales", default: ["en-UK"], array: true
530
+ t.text "supported_currencies", default: [], array: true
531
+ t.string "default_client_locale", default: "en-UK"
532
+ t.string "default_admin_locale", default: "en-UK"
533
+ t.string "default_currency", default: "EUR"
534
+ t.integer "default_area_unit", default: 0
535
+ t.json "social_media", default: {}
536
+ t.text "raw_css"
537
+ t.datetime "created_at", null: false
538
+ t.datetime "updated_at", null: false
462
539
  end
463
540
 
464
- create_table "translations", force: :cascade do |t|
465
- t.string "locale"
466
- t.string "key"
467
- t.text "value"
468
- t.text "interpolations"
469
- t.boolean "is_proc", default: false
470
- t.string "tag"
471
- t.datetime "created_at", null: false
472
- t.datetime "updated_at", null: false
541
+ create_table "translations", id: :serial, force: :cascade do |t|
542
+ t.string "locale"
543
+ t.string "key"
544
+ t.text "value"
545
+ t.text "interpolations"
546
+ t.boolean "is_proc", default: false
547
+ t.string "tag"
548
+ t.datetime "created_at", null: false
549
+ t.datetime "updated_at", null: false
473
550
  end
474
551
 
475
552
  end