cd2_catton_cms 1.1.10

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 (306) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +37 -0
  3. data/app/assets/config/c_manifest.js +2 -0
  4. data/app/assets/images/c/drag_handle.gif +0 -0
  5. data/app/assets/images/c/login_background.jpg +0 -0
  6. data/app/assets/images/c/main_application/hero.jpg +0 -0
  7. data/app/assets/images/c/main_application/search.png +0 -0
  8. data/app/assets/images/c/placeholder_product_image.png +0 -0
  9. data/app/assets/images/c/select_arrow_down_blk.png +0 -0
  10. data/app/assets/images/c/small_icon.png +0 -0
  11. data/app/assets/images/c/vendor/chosen-sprite.png +0 -0
  12. data/app/assets/javascripts/c/application.js +59 -0
  13. data/app/assets/javascripts/c/change_tag.js +49 -0
  14. data/app/assets/javascripts/c/chosen.js +2 -0
  15. data/app/assets/javascripts/c/confirm_delete.js +55 -0
  16. data/app/assets/javascripts/c/draggable_tree.js +223 -0
  17. data/app/assets/javascripts/c/dropzone_init.js +98 -0
  18. data/app/assets/javascripts/c/fake_table.js +87 -0
  19. data/app/assets/javascripts/c/master_form2/collection.js +180 -0
  20. data/app/assets/javascripts/c/master_form2/eu_cookie.js +1 -0
  21. data/app/assets/javascripts/c/master_form2/jrecord.js +116 -0
  22. data/app/assets/javascripts/c/master_form2/master_form.coffee +4 -0
  23. data/app/assets/javascripts/c/split_buttons.js.erb +15 -0
  24. data/app/assets/javascripts/c/things_to_be_done.js +138 -0
  25. data/app/assets/javascripts/c/unloadevent.js +35 -0
  26. data/app/assets/stylesheets/c/_core.sass +237 -0
  27. data/app/assets/stylesheets/c/_engine.sass +4 -0
  28. data/app/assets/stylesheets/c/_variables.sass +32 -0
  29. data/app/assets/stylesheets/c/_vendor.sass +6 -0
  30. data/app/assets/stylesheets/c/application/checkout/_cart.sass +85 -0
  31. data/app/assets/stylesheets/c/application/checkout/_checkout.sass +87 -0
  32. data/app/assets/stylesheets/c/application/elements/buttons.sass +34 -0
  33. data/app/assets/stylesheets/c/application/elements/forms.sass +135 -0
  34. data/app/assets/stylesheets/c/application/elements/shadows.sass +23 -0
  35. data/app/assets/stylesheets/c/application/partials/_breadcrumbs.sass +10 -0
  36. data/app/assets/stylesheets/c/application/partials/_categories_sidebars/_1.sass +53 -0
  37. data/app/assets/stylesheets/c/application/partials/_categories_sidebars/_2.sass +77 -0
  38. data/app/assets/stylesheets/c/application/partials/_footer.sass +43 -0
  39. data/app/assets/stylesheets/c/application/partials/_header.sass +317 -0
  40. data/app/assets/stylesheets/c/engine/_draggable_trees.sass +68 -0
  41. data/app/assets/stylesheets/c/engine/_form_pages.sass +153 -0
  42. data/app/assets/stylesheets/c/engine/_header_bar.sass +29 -0
  43. data/app/assets/stylesheets/c/engine/_index_header.sass +17 -0
  44. data/app/assets/stylesheets/c/engine/_layout.sass +15 -0
  45. data/app/assets/stylesheets/c/engine/_login.sass +38 -0
  46. data/app/assets/stylesheets/c/engine/_navbar.sass +19 -0
  47. data/app/assets/stylesheets/c/engine/_pagination.sass +16 -0
  48. data/app/assets/stylesheets/c/engine/_settings.sass +5 -0
  49. data/app/assets/stylesheets/c/engine/_sidebar.sass +20 -0
  50. data/app/assets/stylesheets/c/engine/_tables.sass +76 -0
  51. data/app/assets/stylesheets/c/engine/flash_messages.sass +2 -0
  52. data/app/assets/stylesheets/c/print_application.sass +167 -0
  53. data/app/assets/stylesheets/c/vendor/_flex_mixins.scss +394 -0
  54. data/app/assets/stylesheets/c/vendor/_normalize.sass +340 -0
  55. data/app/controllers/c/admin/blogs_controller.rb +57 -0
  56. data/app/controllers/c/admin/devise/passwords_controller.rb +5 -0
  57. data/app/controllers/c/admin/devise/sessions_controller.rb +5 -0
  58. data/app/controllers/c/admin/documents_controller.rb +50 -0
  59. data/app/controllers/c/admin/enquiries_controller.rb +22 -0
  60. data/app/controllers/c/admin/images_controller.rb +21 -0
  61. data/app/controllers/c/admin/locations_controller.rb +63 -0
  62. data/app/controllers/c/admin/menu_items_controller.rb +49 -0
  63. data/app/controllers/c/admin/pages_controller.rb +94 -0
  64. data/app/controllers/c/admin/projects_controller.rb +55 -0
  65. data/app/controllers/c/admin/redirects_controller.rb +55 -0
  66. data/app/controllers/c/admin/roles_controller.rb +49 -0
  67. data/app/controllers/c/admin/slides_controller.rb +50 -0
  68. data/app/controllers/c/admin/slideshows_controller.rb +34 -0
  69. data/app/controllers/c/admin/team_members_controller.rb +61 -0
  70. data/app/controllers/c/admin/testimonials_controller.rb +43 -0
  71. data/app/controllers/c/admin/users_controller.rb +51 -0
  72. data/app/controllers/c/admin_controller.rb +43 -0
  73. data/app/controllers/c/application_controller.rb +15 -0
  74. data/app/controllers/c/errors_controller.rb +12 -0
  75. data/app/controllers/c/front/devise/passwords_controller.rb +6 -0
  76. data/app/controllers/c/front/devise/registrations_controller.rb +32 -0
  77. data/app/controllers/c/front/devise/sessions_controller.rb +27 -0
  78. data/app/controllers/c/front/mailchimp_controller.rb +32 -0
  79. data/app/controllers/c/front_controller.rb +7 -0
  80. data/app/controllers/c/front_end/blogs_controller.rb +21 -0
  81. data/app/controllers/c/front_end/enquiries_controller.rb +32 -0
  82. data/app/controllers/c/front_end/pages_controller.rb +19 -0
  83. data/app/controllers/c/main_application_controller.rb +22 -0
  84. data/app/helpers/c/application_helper.rb +51 -0
  85. data/app/helpers/c/blogs_helper.rb +113 -0
  86. data/app/helpers/c/c_form_builder.rb +43 -0
  87. data/app/helpers/c/link_to_helper.rb +25 -0
  88. data/app/helpers/c/navigation_helper.rb +28 -0
  89. data/app/helpers/c/pages_helper.rb +27 -0
  90. data/app/helpers/c/storefront_helper.rb +63 -0
  91. data/app/mailers/c/application_mailer.rb +7 -0
  92. data/app/mailers/c/enquiries_mailer.rb +10 -0
  93. data/app/models/c/ability.rb +21 -0
  94. data/app/models/c/application_record.rb +6 -0
  95. data/app/models/c/author_record.rb +13 -0
  96. data/app/models/c/blog.rb +43 -0
  97. data/app/models/c/document.rb +17 -0
  98. data/app/models/c/enquiry.rb +95 -0
  99. data/app/models/c/image.rb +11 -0
  100. data/app/models/c/location.rb +18 -0
  101. data/app/models/c/menu_item.rb +35 -0
  102. data/app/models/c/non_delete.rb +10 -0
  103. data/app/models/c/page.rb +48 -0
  104. data/app/models/c/page_info.rb +16 -0
  105. data/app/models/c/permission.rb +9 -0
  106. data/app/models/c/permission_subject.rb +12 -0
  107. data/app/models/c/project.rb +20 -0
  108. data/app/models/c/redirect.rb +33 -0
  109. data/app/models/c/role.rb +18 -0
  110. data/app/models/c/slide.rb +16 -0
  111. data/app/models/c/slideshow.rb +23 -0
  112. data/app/models/c/team_member.rb +33 -0
  113. data/app/models/c/testimonial.rb +42 -0
  114. data/app/models/c/user.rb +42 -0
  115. data/app/models/c/user_role.rb +7 -0
  116. data/app/models/c/weight.rb +10 -0
  117. data/app/models/concerns/c/authorable.rb +18 -0
  118. data/app/models/concerns/c/documentable.rb +18 -0
  119. data/app/models/concerns/c/imageable.rb +49 -0
  120. data/app/models/concerns/c/non_deletable.rb +30 -0
  121. data/app/models/concerns/c/orderable.rb +30 -0
  122. data/app/models/concerns/c/previewable.rb +20 -0
  123. data/app/models/concerns/c/site_page.rb +89 -0
  124. data/app/uploaders/c/file_uploader.rb +9 -0
  125. data/app/uploaders/c/image_uploader.rb +39 -0
  126. data/app/views/c/admin/_background_jobs_dropdown.html.haml +18 -0
  127. data/app/views/c/admin/_bread_crumbs.html.haml +7 -0
  128. data/app/views/c/admin/_ebay_categories.html.haml +20 -0
  129. data/app/views/c/admin/_flash_messages.html.haml +5 -0
  130. data/app/views/c/admin/_header_bar.html.haml +18 -0
  131. data/app/views/c/admin/_index_table.html.haml +113 -0
  132. data/app/views/c/admin/_index_table_data.html.haml +17 -0
  133. data/app/views/c/admin/_navigation_bar.html.haml +1 -0
  134. data/app/views/c/admin/_preview_image.html.haml +2 -0
  135. data/app/views/c/admin/_preview_upload.html.haml +18 -0
  136. data/app/views/c/admin/_seo.html.haml +11 -0
  137. data/app/views/c/admin/_side_menu.html.haml +26 -0
  138. data/app/views/c/admin/_uploaded_images_new.html.haml +13 -0
  139. data/app/views/c/admin/blogs/_form.html.haml +58 -0
  140. data/app/views/c/admin/blogs/index.html.haml +9 -0
  141. data/app/views/c/admin/confirm_destroy.html.haml +6 -0
  142. data/app/views/c/admin/confirm_mass_destroy.html.haml +10 -0
  143. data/app/views/c/admin/documents/_form.html.haml +8 -0
  144. data/app/views/c/admin/documents/index.html.haml +9 -0
  145. data/app/views/c/admin/edit.html.haml +15 -0
  146. data/app/views/c/admin/enquiries/index.html.haml +14 -0
  147. data/app/views/c/admin/locations/_form.html.haml +58 -0
  148. data/app/views/c/admin/locations/index.html.haml +9 -0
  149. data/app/views/c/admin/menu_items/_form.html.haml +44 -0
  150. data/app/views/c/admin/menu_items/_menu_item_list_item.html.haml +10 -0
  151. data/app/views/c/admin/menu_items/index.html.haml +10 -0
  152. data/app/views/c/admin/new.html.haml +8 -0
  153. data/app/views/c/admin/pages/_form.html.haml +93 -0
  154. data/app/views/c/admin/pages/_page_list_item.html.haml +10 -0
  155. data/app/views/c/admin/pages/dashboard.html.erb +0 -0
  156. data/app/views/c/admin/pages/index.html.haml +11 -0
  157. data/app/views/c/admin/projects/_form.html.haml +46 -0
  158. data/app/views/c/admin/projects/index.html.haml +9 -0
  159. data/app/views/c/admin/quick_edit.js.erb +6 -0
  160. data/app/views/c/admin/redirects/_form.html.haml +14 -0
  161. data/app/views/c/admin/redirects/index.html.haml +9 -0
  162. data/app/views/c/admin/reload_images.js.erb +2 -0
  163. data/app/views/c/admin/roles/_form.html.haml +42 -0
  164. data/app/views/c/admin/roles/index.html.haml +17 -0
  165. data/app/views/c/admin/set_preview_image.js.erb +1 -0
  166. data/app/views/c/admin/show.html.haml +1 -0
  167. data/app/views/c/admin/slides/_form.html.haml +19 -0
  168. data/app/views/c/admin/slideshows/_form.html.haml +25 -0
  169. data/app/views/c/admin/slideshows/index.html.haml +8 -0
  170. data/app/views/c/admin/team_members/_form.html.haml +20 -0
  171. data/app/views/c/admin/team_members/index.html.haml +10 -0
  172. data/app/views/c/admin/testimonials/_form.html.haml +13 -0
  173. data/app/views/c/admin/testimonials/index.html.haml +8 -0
  174. data/app/views/c/admin/users/_form.html.haml +17 -0
  175. data/app/views/c/admin/users/index.html.haml +12 -0
  176. data/app/views/c/enquiries_mailer/new_enquiry.html.haml +14 -0
  177. data/app/views/c/enquiries_mailer/new_enquiry.text.haml +9 -0
  178. data/app/views/c/errors/404.html.haml +5 -0
  179. data/app/views/c/errors/500.html.haml +5 -0
  180. data/app/views/c/front/application/_category_item.html.haml +2 -0
  181. data/app/views/c/front/application/_menu_item.html.haml +4 -0
  182. data/app/views/c/front/application/_sales_highlight.html.haml +1 -0
  183. data/app/views/c/front/application/_slide.html.haml +6 -0
  184. data/app/views/c/front/blogs/_archive_filter_month.html.haml +2 -0
  185. data/app/views/c/front/blogs/_archive_filter_year.html.haml +1 -0
  186. data/app/views/c/front/blogs/_menu_item.html.haml +2 -0
  187. data/app/views/c/front_end/enquiries/new.html.haml +23 -0
  188. data/app/views/c/front_end/enquiries/thanks.html.haml +5 -0
  189. data/app/views/c/front_end/pages/_sales_highlight.html.haml +7 -0
  190. data/app/views/c/front_end/pages/about.html.haml +8 -0
  191. data/app/views/c/front_end/pages/home.html.haml +19 -0
  192. data/app/views/c/front_end/pages/search.html.haml +16 -0
  193. data/app/views/c/front_end/pages/show.html.haml +7 -0
  194. data/app/views/c/front_end/pages/sitemap.xml.builder +25 -0
  195. data/app/views/c/mailchimp/_signup_newsletter.html.haml +4 -0
  196. data/app/views/c/main_application/_application_bar.html.haml +22 -0
  197. data/app/views/c/main_application/_breadcrumbs.html.haml +7 -0
  198. data/app/views/c/main_application/_contact_info.html.haml +5 -0
  199. data/app/views/c/main_application/_footer.html.haml +49 -0
  200. data/app/views/c/main_application/_front_head_tags.html.haml +3 -0
  201. data/app/views/c/main_application/_header.html.haml +55 -0
  202. data/app/views/c/main_application/_site_search.html.haml +3 -0
  203. data/app/views/c/main_application/_yield.html.haml +5 -0
  204. data/app/views/devise/confirmations/new.html.erb +16 -0
  205. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  206. data/app/views/devise/mailer/password_change.html.erb +3 -0
  207. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  208. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  209. data/app/views/devise/passwords/edit.html.haml +26 -0
  210. data/app/views/devise/passwords/new.html.haml +14 -0
  211. data/app/views/devise/registrations/edit.html.haml +40 -0
  212. data/app/views/devise/registrations/new.html.haml +24 -0
  213. data/app/views/devise/sessions/new.html.haml +20 -0
  214. data/app/views/devise/shared/_links.html.erb +25 -0
  215. data/app/views/devise/unlocks/new.html.erb +16 -0
  216. data/app/views/layouts/c/application.html.haml +18 -0
  217. data/app/views/layouts/c/cms_login_layout.html.haml +18 -0
  218. data/app/views/layouts/c/mailer.html.erb +245 -0
  219. data/app/views/layouts/c/mailer.text.erb +3 -0
  220. data/app/views/layouts/c/main_application.html.haml +13 -0
  221. data/config/environment.rb +0 -0
  222. data/config/initializers/carrierwave.rb +18 -0
  223. data/config/initializers/devise.rb +283 -0
  224. data/config/initializers/rack_profiler.rb +8 -0
  225. data/config/locales/devise.en.yml +62 -0
  226. data/config/locales/en.yml +17 -0
  227. data/config/routes.rb +150 -0
  228. data/db/migrate/20160819000000_migrate_schema.rb +273 -0
  229. data/db/seed_data/countries.txt +227 -0
  230. data/lib/c/engine.rb +38 -0
  231. data/lib/c/version.rb +4 -0
  232. data/lib/cd2_catton_cms.rb +51 -0
  233. data/lib/tasks/c_tasks.rake +28 -0
  234. data/spec/dummy/Gemfile +4 -0
  235. data/spec/dummy/Gemfile.lock +20 -0
  236. data/spec/dummy/Rakefile +6 -0
  237. data/spec/dummy/app/assets/config/manifest.js +5 -0
  238. data/spec/dummy/app/assets/images/placeholder.png +0 -0
  239. data/spec/dummy/app/assets/javascripts/application.js +26 -0
  240. data/spec/dummy/app/assets/javascripts/cable.js +13 -0
  241. data/spec/dummy/app/assets/javascripts/pages.coffee +3 -0
  242. data/spec/dummy/app/assets/stylesheets/application.sass +13 -0
  243. data/spec/dummy/app/assets/stylesheets/c/application.sass +2 -0
  244. data/spec/dummy/app/controllers/application_controller.rb +10 -0
  245. data/spec/dummy/app/controllers/blogs_controller.rb +11 -0
  246. data/spec/dummy/app/controllers/pages_controller.rb +13 -0
  247. data/spec/dummy/app/models/application_record.rb +4 -0
  248. data/spec/dummy/app/models/page.rb +3 -0
  249. data/spec/dummy/bin/bundle +4 -0
  250. data/spec/dummy/bin/rails +5 -0
  251. data/spec/dummy/bin/rake +5 -0
  252. data/spec/dummy/bin/setup +35 -0
  253. data/spec/dummy/bin/update +30 -0
  254. data/spec/dummy/config/application.rb +17 -0
  255. data/spec/dummy/config/boot.rb +6 -0
  256. data/spec/dummy/config/cable.yml +9 -0
  257. data/spec/dummy/config/database.travis.yml +3 -0
  258. data/spec/dummy/config/database.yml +85 -0
  259. data/spec/dummy/config/environment.rb +6 -0
  260. data/spec/dummy/config/environments/development.rb +61 -0
  261. data/spec/dummy/config/environments/production.rb +87 -0
  262. data/spec/dummy/config/environments/test.rb +43 -0
  263. data/spec/dummy/config/initializers/application_controller_renderer.rb +7 -0
  264. data/spec/dummy/config/initializers/assets.rb +21 -0
  265. data/spec/dummy/config/initializers/backtrace_silencers.rb +8 -0
  266. data/spec/dummy/config/initializers/carrierwave.rb +15 -0
  267. data/spec/dummy/config/initializers/commercity.rb +4 -0
  268. data/spec/dummy/config/initializers/cookies_serializer.rb +6 -0
  269. data/spec/dummy/config/initializers/filter_parameter_logging.rb +5 -0
  270. data/spec/dummy/config/initializers/inflections.rb +17 -0
  271. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  272. data/spec/dummy/config/initializers/new_framework_defaults.rb +25 -0
  273. data/spec/dummy/config/initializers/session_store.rb +4 -0
  274. data/spec/dummy/config/initializers/wrap_parameters.rb +15 -0
  275. data/spec/dummy/config/locales/en.yml +23 -0
  276. data/spec/dummy/config/puma.rb +48 -0
  277. data/spec/dummy/config/routes.rb +4 -0
  278. data/spec/dummy/config/secrets.yml +22 -0
  279. data/spec/dummy/config/sidekiq.yml +6 -0
  280. data/spec/dummy/config/spring.rb +7 -0
  281. data/spec/dummy/config.ru +5 -0
  282. data/spec/dummy/db/schema.rb +1110 -0
  283. data/spec/dummy/lib/tasks/reprocess_images.rake +12 -0
  284. data/spec/dummy/lib/tasks/reset_all.rake +44 -0
  285. data/spec/dummy/lib/tasks/seeds/seed_blogs.rake +8 -0
  286. data/spec/dummy/lib/tasks/seeds/seed_pages.rake +24 -0
  287. data/spec/dummy/public/404.html +67 -0
  288. data/spec/dummy/public/422.html +67 -0
  289. data/spec/dummy/public/500.html +66 -0
  290. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  291. data/spec/dummy/public/apple-touch-icon.png +0 -0
  292. data/spec/dummy/public/favicon.ico +0 -0
  293. data/spec/dummy/seed/highlight1.png +0 -0
  294. data/spec/dummy/seed/highlight2.png +0 -0
  295. data/spec/dummy/seed/images/1/main.jpg +0 -0
  296. data/spec/dummy/seed/images/1/thumb.JPG +0 -0
  297. data/spec/dummy/seed/images/1/thumb2.jpg +0 -0
  298. data/spec/dummy/seed/images/2/main.jpeg +0 -0
  299. data/spec/dummy/seed/images/2/thumb.JPG +0 -0
  300. data/spec/dummy/seed/images/2/thumb2.JPG +0 -0
  301. data/spec/dummy/spec/models/redirect_spec.rb +57 -0
  302. data/spec/dummy/spec/support/factory_girl.rb +8 -0
  303. data/spec/dummy/spec/support/seed/images/product_image.png +0 -0
  304. data/spec/rails_helper.rb +49 -0
  305. data/spec/spec_helper.rb +52 -0
  306. metadata +734 -0
@@ -0,0 +1,1110 @@
1
+ # This file is auto-generated from the current state of the database. Instead
2
+ # of editing this file, please use the migrations feature of Active Record to
3
+ # incrementally modify your database, and then regenerate this schema definition.
4
+ #
5
+ # Note that this schema.rb definition is the authoritative source for your
6
+ # database schema. If you need to create the application database on another
7
+ # system, you should be using db:schema:load, not running all the migrations
8
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
10
+ #
11
+ # It's strongly recommended that you check this file into your version control system.
12
+
13
+ ActiveRecord::Schema.define(version: 20170316185916) do
14
+
15
+ # These are extensions that must be enabled in order to support this database
16
+ enable_extension "plpgsql"
17
+
18
+ create_table "c_addresses", force: :cascade do |t|
19
+ t.integer "customer_id"
20
+ t.string "name"
21
+ t.string "address_one"
22
+ t.string "address_two"
23
+ t.string "address_three"
24
+ t.string "city"
25
+ t.string "region"
26
+ t.string "postcode"
27
+ t.integer "country_id"
28
+ t.string "phone"
29
+ t.string "fax"
30
+ t.boolean "default", default: false
31
+ t.datetime "created_at", null: false
32
+ t.datetime "updated_at", null: false
33
+ t.string "mobile"
34
+ t.string "first_name"
35
+ t.string "last_name"
36
+ t.index ["country_id"], name: "index_c_addresses_on_country_id", using: :btree
37
+ t.index ["customer_id"], name: "index_c_addresses_on_customer_id", using: :btree
38
+ end
39
+
40
+ create_table "c_amazon_browse_nodes", force: :cascade do |t|
41
+ t.string "name"
42
+ t.string "node_id"
43
+ t.string "node_path"
44
+ t.datetime "created_at", null: false
45
+ t.datetime "updated_at", null: false
46
+ end
47
+
48
+ create_table "c_amazon_browse_nodes_categorizations", force: :cascade do |t|
49
+ t.integer "amazon_channel_id"
50
+ t.integer "amazon_browse_node_id"
51
+ t.datetime "created_at", null: false
52
+ t.datetime "updated_at", null: false
53
+ t.index ["amazon_browse_node_id"], name: "index_abnc_on_amazon_browse_node", using: :btree
54
+ t.index ["amazon_channel_id"], name: "index_abnc_on_amazon_channel", using: :btree
55
+ end
56
+
57
+ create_table "c_amazon_categories", force: :cascade do |t|
58
+ t.string "name"
59
+ t.datetime "created_at", null: false
60
+ t.datetime "updated_at", null: false
61
+ end
62
+
63
+ create_table "c_amazon_processing_queues", force: :cascade do |t|
64
+ t.string "feed_id"
65
+ t.integer "feed_type"
66
+ t.integer "job_status"
67
+ t.datetime "submitted_at"
68
+ t.datetime "completed_at"
69
+ t.datetime "created_at", null: false
70
+ t.datetime "updated_at", null: false
71
+ t.text "failure_message"
72
+ t.text "feed_body"
73
+ end
74
+
75
+ create_table "c_amazon_product_attributes", force: :cascade do |t|
76
+ t.integer "product_type_id"
77
+ t.string "name"
78
+ t.datetime "created_at", null: false
79
+ t.datetime "updated_at", null: false
80
+ t.index ["product_type_id"], name: "index_c_amazon_product_attributes_on_product_type_id", using: :btree
81
+ end
82
+
83
+ create_table "c_amazon_product_types", force: :cascade do |t|
84
+ t.string "name"
85
+ t.datetime "created_at", null: false
86
+ t.datetime "updated_at", null: false
87
+ t.integer "amazon_category_id"
88
+ t.index ["amazon_category_id"], name: "index_c_amazon_product_types_on_amazon_category_id", using: :btree
89
+ end
90
+
91
+ create_table "c_apqs_products", force: :cascade do |t|
92
+ t.integer "product_id"
93
+ t.integer "amazon_processing_queue_id"
94
+ t.index ["amazon_processing_queue_id"], name: "index_c_apqs_products_on_amazon_processing_queue_id", using: :btree
95
+ t.index ["product_id"], name: "index_c_apqs_products_on_product_id", using: :btree
96
+ end
97
+
98
+ create_table "c_author_records", force: :cascade do |t|
99
+ t.integer "user_id"
100
+ t.string "authored_type"
101
+ t.integer "authored_id"
102
+ t.datetime "created_at", null: false
103
+ t.datetime "updated_at", null: false
104
+ t.index ["authored_type", "authored_id"], name: "index_c_author_records_on_authored_type_and_authored_id", using: :btree
105
+ t.index ["user_id"], name: "index_c_author_records_on_user_id", using: :btree
106
+ end
107
+
108
+ create_table "c_background_jobs", force: :cascade do |t|
109
+ t.string "name"
110
+ t.datetime "last_ran"
111
+ t.datetime "created_at", null: false
112
+ t.datetime "updated_at", null: false
113
+ t.string "message"
114
+ t.integer "job_size"
115
+ t.integer "job_processed_count"
116
+ end
117
+
118
+ create_table "c_blogs", force: :cascade do |t|
119
+ t.string "name"
120
+ t.text "body"
121
+ t.datetime "created_at", null: false
122
+ t.datetime "updated_at", null: false
123
+ t.string "url_alias"
124
+ t.text "preview_body"
125
+ t.index ["created_at"], name: "index_c_blogs_on_created_at", using: :btree
126
+ end
127
+
128
+ create_table "c_brands", force: :cascade do |t|
129
+ t.string "name"
130
+ t.text "body"
131
+ t.string "internal_id"
132
+ t.string "url"
133
+ t.string "image"
134
+ t.boolean "manufacturer"
135
+ t.boolean "supplier"
136
+ t.datetime "created_at", null: false
137
+ t.datetime "updated_at", null: false
138
+ t.boolean "featured", default: false
139
+ t.string "url_alias"
140
+ end
141
+
142
+ create_table "c_cart_items", force: :cascade do |t|
143
+ t.integer "quantity", default: 0
144
+ t.integer "variant_id"
145
+ t.integer "cart_id"
146
+ t.datetime "created_at", null: false
147
+ t.datetime "updated_at", null: false
148
+ t.index ["cart_id"], name: "index_c_cart_items_on_cart_id", using: :btree
149
+ t.index ["variant_id"], name: "index_c_cart_items_on_variant_id", using: :btree
150
+ end
151
+
152
+ create_table "c_carts", force: :cascade do |t|
153
+ t.integer "customer_id"
154
+ t.integer "order_id"
155
+ t.boolean "anonymous", default: false
156
+ t.datetime "created_at", null: false
157
+ t.datetime "updated_at", null: false
158
+ t.string "item_digest"
159
+ t.index ["customer_id"], name: "index_c_carts_on_customer_id", using: :btree
160
+ t.index ["order_id"], name: "index_c_carts_on_order_id", using: :btree
161
+ end
162
+
163
+ create_table "c_categories", force: :cascade do |t|
164
+ t.string "name"
165
+ t.string "internal_id"
166
+ t.string "displayed_name"
167
+ t.text "body"
168
+ t.string "image"
169
+ t.integer "parent_id"
170
+ t.integer "weight"
171
+ t.datetime "created_at", null: false
172
+ t.datetime "updated_at", null: false
173
+ t.boolean "featured", default: false
174
+ t.string "banner_url"
175
+ t.string "alt_tag"
176
+ t.string "url_alias"
177
+ t.boolean "in_menu", default: false
178
+ t.string "google_category"
179
+ t.integer "amazon_product_type_id"
180
+ t.integer "ebay_category_id"
181
+ t.index ["amazon_product_type_id"], name: "index_c_categories_on_amazon_product_type_id", using: :btree
182
+ t.index ["parent_id"], name: "index_c_categories_on_parent_id", using: :btree
183
+ end
184
+
185
+ create_table "c_category_hierarchies", id: false, force: :cascade do |t|
186
+ t.integer "ancestor_id", null: false
187
+ t.integer "descendant_id", null: false
188
+ t.integer "generations", null: false
189
+ t.index ["ancestor_id", "descendant_id", "generations"], name: "category_anc_desc_idx", unique: true, using: :btree
190
+ t.index ["descendant_id"], name: "category_desc_idx", using: :btree
191
+ end
192
+
193
+ create_table "c_category_property_keys", force: :cascade do |t|
194
+ t.integer "category_id"
195
+ t.integer "property_key_id"
196
+ t.datetime "created_at", null: false
197
+ t.datetime "updated_at", null: false
198
+ t.index ["category_id"], name: "index_c_category_property_keys_on_category_id", using: :btree
199
+ t.index ["property_key_id"], name: "index_c_category_property_keys_on_property_key_id", using: :btree
200
+ end
201
+
202
+ create_table "c_countries", force: :cascade do |t|
203
+ t.string "name"
204
+ t.string "iso2"
205
+ t.string "iso3"
206
+ t.string "tld"
207
+ t.string "currency"
208
+ t.boolean "eu", default: false
209
+ t.boolean "active", default: true
210
+ t.datetime "created_at", null: false
211
+ t.datetime "updated_at", null: false
212
+ t.integer "zone_id"
213
+ end
214
+
215
+ create_table "c_customer_accounts", force: :cascade do |t|
216
+ t.string "email", default: "", null: false
217
+ t.string "encrypted_password", default: "", null: false
218
+ t.string "reset_password_token"
219
+ t.datetime "reset_password_sent_at"
220
+ t.datetime "remember_created_at"
221
+ t.integer "sign_in_count", default: 0, null: false
222
+ t.datetime "current_sign_in_at"
223
+ t.datetime "last_sign_in_at"
224
+ t.string "current_sign_in_ip"
225
+ t.string "last_sign_in_ip"
226
+ t.datetime "created_at", null: false
227
+ t.datetime "updated_at", null: false
228
+ t.index ["email"], name: "index_c_customer_accounts_on_email", unique: true, using: :btree
229
+ t.index ["reset_password_token"], name: "index_c_customer_accounts_on_reset_password_token", unique: true, using: :btree
230
+ end
231
+
232
+ create_table "c_customers", force: :cascade do |t|
233
+ t.string "email", default: "", null: false
234
+ t.datetime "remember_created_at"
235
+ t.datetime "created_at", null: false
236
+ t.datetime "updated_at", null: false
237
+ t.string "name"
238
+ t.string "company"
239
+ t.string "phone"
240
+ t.string "mobile"
241
+ t.string "fax"
242
+ t.string "thumbnail"
243
+ t.integer "channel"
244
+ t.string "amazon_email"
245
+ t.boolean "sparse", default: false
246
+ t.integer "customer_account_id"
247
+ t.index ["customer_account_id"], name: "index_c_customers_on_customer_account_id", using: :btree
248
+ t.index ["email"], name: "index_c_customers_on_email", unique: true, using: :btree
249
+ end
250
+
251
+ create_table "c_data_transfers", force: :cascade do |t|
252
+ t.string "name"
253
+ t.string "file"
254
+ t.datetime "created_at", null: false
255
+ t.datetime "updated_at", null: false
256
+ t.integer "import_type"
257
+ t.datetime "import_finished_at"
258
+ t.datetime "import_started_at"
259
+ end
260
+
261
+ create_table "c_delivery_providers", force: :cascade do |t|
262
+ t.string "name"
263
+ t.datetime "created_at", null: false
264
+ t.datetime "updated_at", null: false
265
+ end
266
+
267
+ create_table "c_delivery_rule_gaps", force: :cascade do |t|
268
+ t.integer "rule_id"
269
+ t.integer "lower_bound", default: 0
270
+ t.decimal "cost"
271
+ t.datetime "created_at", null: false
272
+ t.datetime "updated_at", null: false
273
+ t.index ["rule_id"], name: "index_c_delivery_rule_gaps_on_rule_id", using: :btree
274
+ end
275
+
276
+ create_table "c_delivery_rules", force: :cascade do |t|
277
+ t.integer "service_id"
278
+ t.integer "zone_id"
279
+ t.decimal "base_price"
280
+ t.datetime "created_at", null: false
281
+ t.datetime "updated_at", null: false
282
+ t.integer "max_cart_price_pennies"
283
+ t.string "max_cart_price_currency", default: "GBP", null: false
284
+ t.integer "min_cart_price_pennies", default: 0, null: false
285
+ t.string "min_cart_price_currency", default: "GBP", null: false
286
+ t.index ["service_id"], name: "index_c_delivery_rules_on_service_id", using: :btree
287
+ end
288
+
289
+ create_table "c_delivery_service_prices", force: :cascade do |t|
290
+ t.decimal "min_weight"
291
+ t.decimal "max_weight"
292
+ t.text "country_ids"
293
+ t.integer "price_pennies", default: 0, null: false
294
+ t.string "price_currency", default: "GBP", null: false
295
+ t.integer "delivery_service_id"
296
+ t.datetime "created_at", null: false
297
+ t.datetime "updated_at", null: false
298
+ t.integer "max_cart_price_pennies"
299
+ t.string "max_cart_price_currency", default: "GBP", null: false
300
+ t.integer "min_cart_price_pennies", default: 0, null: false
301
+ t.string "min_cart_price_currency", default: "GBP", null: false
302
+ t.index ["delivery_service_id"], name: "index_c_delivery_service_prices_on_delivery_service_id", using: :btree
303
+ end
304
+
305
+ create_table "c_delivery_service_providers", force: :cascade do |t|
306
+ t.string "name"
307
+ t.datetime "created_at", null: false
308
+ t.datetime "updated_at", null: false
309
+ end
310
+
311
+ create_table "c_delivery_services", force: :cascade do |t|
312
+ t.string "name"
313
+ t.integer "provider_id"
314
+ t.integer "channel"
315
+ t.datetime "created_at", null: false
316
+ t.datetime "updated_at", null: false
317
+ t.string "ebay_alias"
318
+ t.string "display_name"
319
+ t.index ["provider_id"], name: "index_c_delivery_services_on_provider_id", using: :btree
320
+ end
321
+
322
+ create_table "c_delivery_services_old", force: :cascade do |t|
323
+ t.string "name"
324
+ t.string "code"
325
+ t.boolean "active"
326
+ t.boolean "default"
327
+ t.integer "delivery_service_provider_id"
328
+ t.datetime "created_at", null: false
329
+ t.datetime "updated_at", null: false
330
+ t.string "ebay_alias"
331
+ t.index ["delivery_service_provider_id"], name: "index_c_delivery_services_old_on_delivery_service_provider_id", using: :btree
332
+ end
333
+
334
+ create_table "c_documents", force: :cascade do |t|
335
+ t.string "name"
336
+ t.string "document"
337
+ t.string "documentable_type"
338
+ t.integer "documentable_id"
339
+ t.datetime "created_at", null: false
340
+ t.datetime "updated_at", null: false
341
+ end
342
+
343
+ create_table "c_ebay_categories", force: :cascade do |t|
344
+ t.boolean "best_offer_enabled"
345
+ t.boolean "auto_pay_enabled"
346
+ t.integer "category_id"
347
+ t.integer "category_level"
348
+ t.string "category_name"
349
+ t.integer "category_parent_id"
350
+ t.integer "parent_id"
351
+ t.datetime "created_at", null: false
352
+ t.datetime "updated_at", null: false
353
+ end
354
+
355
+ create_table "c_ebay_category_hierarchies", id: false, force: :cascade do |t|
356
+ t.integer "ancestor_id", null: false
357
+ t.integer "descendant_id", null: false
358
+ t.integer "generations", null: false
359
+ t.index ["ancestor_id", "descendant_id", "generations"], name: "ebay_category_anc_desc_idx", unique: true, using: :btree
360
+ t.index ["descendant_id"], name: "ebay_category_desc_idx", using: :btree
361
+ end
362
+
363
+ create_table "c_enquiries", force: :cascade do |t|
364
+ t.string "name"
365
+ t.string "email"
366
+ t.text "body"
367
+ t.datetime "created_at", null: false
368
+ t.datetime "updated_at", null: false
369
+ end
370
+
371
+ create_table "c_images", force: :cascade do |t|
372
+ t.string "image"
373
+ t.string "alt"
374
+ t.string "caption"
375
+ t.integer "imageable_id"
376
+ t.string "imageable_type"
377
+ t.boolean "featured_image", default: false
378
+ t.datetime "created_at", null: false
379
+ t.datetime "updated_at", null: false
380
+ t.boolean "preview_image", default: false
381
+ end
382
+
383
+ create_table "c_locations", force: :cascade do |t|
384
+ t.string "name"
385
+ t.text "body"
386
+ t.datetime "created_at", null: false
387
+ t.datetime "updated_at", null: false
388
+ t.string "url_alias"
389
+ end
390
+
391
+ create_table "c_menu_item_hierarchies", id: false, force: :cascade do |t|
392
+ t.integer "ancestor_id", null: false
393
+ t.integer "descendant_id", null: false
394
+ t.integer "generations", null: false
395
+ t.index ["ancestor_id", "descendant_id", "generations"], name: "menu_item_anc_desc_idx", unique: true, using: :btree
396
+ t.index ["descendant_id"], name: "menu_item_desc_idx", using: :btree
397
+ end
398
+
399
+ create_table "c_menu_items", force: :cascade do |t|
400
+ t.string "name"
401
+ t.string "link"
402
+ t.boolean "visible", default: true
403
+ t.integer "parent_id"
404
+ t.integer "weight"
405
+ t.string "machine_name"
406
+ t.integer "page_id"
407
+ t.datetime "created_at", null: false
408
+ t.datetime "updated_at", null: false
409
+ t.string "target"
410
+ t.index ["page_id"], name: "index_c_menu_items_on_page_id", using: :btree
411
+ end
412
+
413
+ create_table "c_non_deletes", force: :cascade do |t|
414
+ t.boolean "deleted", default: false
415
+ t.string "non_deletable_type"
416
+ t.integer "non_deletable_id"
417
+ t.datetime "created_at", null: false
418
+ t.datetime "updated_at", null: false
419
+ t.index ["non_deletable_type", "non_deletable_id"], name: "index_c_non_deletes_on_non_deletable_type_and_non_deletable_id", using: :btree
420
+ end
421
+
422
+ create_table "c_order_amazon_orders", force: :cascade do |t|
423
+ t.string "amazon_id"
424
+ t.string "buyer_name"
425
+ t.string "buyer_email"
426
+ t.string "selected_shipping"
427
+ t.date "earliest_delivery_date"
428
+ t.date "latest_delivery_date"
429
+ t.text "body"
430
+ t.integer "order_id"
431
+ t.datetime "created_at", null: false
432
+ t.datetime "updated_at", null: false
433
+ t.index ["order_id"], name: "index_c_order_amazon_orders_on_order_id", using: :btree
434
+ end
435
+
436
+ create_table "c_order_deliveries", force: :cascade do |t|
437
+ t.string "name"
438
+ t.integer "price_pennies", default: 0, null: false
439
+ t.string "price_currency", default: "GBP", null: false
440
+ t.datetime "processing_at"
441
+ t.datetime "shipped_at"
442
+ t.string "tracking_code"
443
+ t.integer "delivery_service_price_id"
444
+ t.datetime "created_at", null: false
445
+ t.datetime "updated_at", null: false
446
+ t.boolean "overridden", default: false
447
+ t.string "delivery_provider"
448
+ t.integer "delivery_service_id"
449
+ t.index ["delivery_service_price_id"], name: "index_c_order_deliveries_on_delivery_service_price_id", using: :btree
450
+ end
451
+
452
+ create_table "c_order_ebay_orders", force: :cascade do |t|
453
+ t.string "ebay_order_id"
454
+ t.string "buyer_username"
455
+ t.string "buyer_email"
456
+ t.text "transaction_id"
457
+ t.string "gateway_transaction_id"
458
+ t.text "body"
459
+ t.integer "order_id"
460
+ t.datetime "created_at", null: false
461
+ t.datetime "updated_at", null: false
462
+ t.string "ebay_delivery_service"
463
+ t.index ["order_id"], name: "index_c_order_ebay_orders_on_order_id", using: :btree
464
+ end
465
+
466
+ create_table "c_order_items", force: :cascade do |t|
467
+ t.integer "order_id"
468
+ t.integer "product_id"
469
+ t.string "name"
470
+ t.integer "price_pennies", default: 0, null: false
471
+ t.string "price_currency", default: "GBP", null: false
472
+ t.integer "quantity", default: 0
473
+ t.datetime "created_at", null: false
474
+ t.datetime "updated_at", null: false
475
+ t.decimal "tax_rate"
476
+ t.string "sku"
477
+ t.index ["order_id"], name: "index_c_order_items_on_order_id", using: :btree
478
+ t.index ["product_id"], name: "index_c_order_items_on_product_id", using: :btree
479
+ end
480
+
481
+ create_table "c_order_notes", force: :cascade do |t|
482
+ t.string "note"
483
+ t.integer "order_id"
484
+ t.integer "user_id"
485
+ t.datetime "created_at", null: false
486
+ t.datetime "updated_at", null: false
487
+ t.index ["order_id"], name: "index_c_order_notes_on_order_id", using: :btree
488
+ t.index ["user_id"], name: "index_c_order_notes_on_user_id", using: :btree
489
+ end
490
+
491
+ create_table "c_order_payments", force: :cascade do |t|
492
+ t.integer "amount_paid_pennies", default: 0, null: false
493
+ t.string "amount_paid_currency", default: "GBP", null: false
494
+ t.datetime "created_at", null: false
495
+ t.datetime "updated_at", null: false
496
+ t.string "payable_type"
497
+ t.integer "payable_id"
498
+ t.index ["payable_type", "payable_id"], name: "index_c_order_payments_on_payable_type_and_payable_id", using: :btree
499
+ end
500
+
501
+ create_table "c_order_sales", force: :cascade do |t|
502
+ t.integer "customer_id"
503
+ t.integer "shipping_address_id"
504
+ t.integer "billing_address_id"
505
+ t.integer "delivery_id"
506
+ t.integer "payment_id"
507
+ t.integer "status", default: 5
508
+ t.integer "channel", default: 0
509
+ t.integer "flag", default: 0
510
+ t.text "checkout_notes"
511
+ t.datetime "recieved_at"
512
+ t.datetime "created_at", null: false
513
+ t.datetime "updated_at", null: false
514
+ t.string "ebay_order_id"
515
+ t.boolean "printed", default: false
516
+ t.string "name"
517
+ t.string "email"
518
+ t.string "phone"
519
+ t.string "mobile"
520
+ t.text "channel_hash"
521
+ t.json "body"
522
+ t.uuid "access_token"
523
+ t.index ["billing_address_id"], name: "index_c_order_sales_on_billing_address_id", using: :btree
524
+ t.index ["customer_id"], name: "index_c_order_sales_on_customer_id", using: :btree
525
+ t.index ["delivery_id"], name: "index_c_order_sales_on_delivery_id", using: :btree
526
+ t.index ["payment_id"], name: "index_c_order_sales_on_payment_id", using: :btree
527
+ t.index ["shipping_address_id"], name: "index_c_order_sales_on_shipping_address_id", using: :btree
528
+ end
529
+
530
+ create_table "c_page_hierarchies", id: false, force: :cascade do |t|
531
+ t.integer "ancestor_id", null: false
532
+ t.integer "descendant_id", null: false
533
+ t.integer "generations", null: false
534
+ t.index ["ancestor_id", "descendant_id", "generations"], name: "page_anc_desc_idx", unique: true, using: :btree
535
+ t.index ["descendant_id"], name: "page_desc_idx", using: :btree
536
+ end
537
+
538
+ create_table "c_page_infos", force: :cascade do |t|
539
+ t.string "title"
540
+ t.text "meta_description"
541
+ t.string "url_alias"
542
+ t.boolean "published", default: true
543
+ t.boolean "protected", default: false
544
+ t.string "page_type"
545
+ t.integer "page_id"
546
+ t.boolean "home_page", default: false
547
+ t.integer "order"
548
+ t.datetime "created_at", null: false
549
+ t.datetime "updated_at", null: false
550
+ t.index ["page_type", "page_id"], name: "index_c_page_infos_on_page_type_and_page_id", using: :btree
551
+ t.index ["url_alias"], name: "index_c_page_infos_on_url_alias", using: :btree
552
+ end
553
+
554
+ create_table "c_pages", force: :cascade do |t|
555
+ t.string "name"
556
+ t.text "body"
557
+ t.string "layout"
558
+ t.boolean "in_menu"
559
+ t.string "menu_item"
560
+ t.datetime "created_at", null: false
561
+ t.datetime "updated_at", null: false
562
+ t.string "url_alias"
563
+ t.text "preview_body"
564
+ t.integer "parent_id"
565
+ t.integer "weight"
566
+ end
567
+
568
+ create_table "c_payment_method_manuals", force: :cascade do |t|
569
+ t.string "body"
570
+ t.datetime "created_at", null: false
571
+ t.datetime "updated_at", null: false
572
+ end
573
+
574
+ create_table "c_payment_method_paypal_expresses", force: :cascade do |t|
575
+ t.string "payer_id"
576
+ t.string "ip"
577
+ t.string "payment_token"
578
+ t.datetime "created_at", null: false
579
+ t.datetime "updated_at", null: false
580
+ end
581
+
582
+ create_table "c_payment_method_sagepays", force: :cascade do |t|
583
+ t.string "ip"
584
+ t.string "card_identifier"
585
+ t.string "merchant_session_key"
586
+ t.string "transaction_id"
587
+ t.datetime "created_at", null: false
588
+ t.datetime "updated_at", null: false
589
+ end
590
+
591
+ create_table "c_payment_method_v12_finances", force: :cascade do |t|
592
+ t.string "ip"
593
+ t.string "application_id"
594
+ t.string "application_guid"
595
+ t.datetime "created_at", null: false
596
+ t.datetime "updated_at", null: false
597
+ t.integer "last_status", default: 0
598
+ end
599
+
600
+ create_table "c_payment_method_worldpays", force: :cascade do |t|
601
+ t.string "ip"
602
+ t.string "payment_token"
603
+ t.string "order_code"
604
+ t.datetime "created_at", null: false
605
+ t.datetime "updated_at", null: false
606
+ end
607
+
608
+ create_table "c_permission_subjects", force: :cascade do |t|
609
+ t.string "name"
610
+ t.text "body"
611
+ t.string "subject_type"
612
+ t.integer "subject_id"
613
+ t.datetime "created_at", null: false
614
+ t.datetime "updated_at", null: false
615
+ end
616
+
617
+ create_table "c_permissions", force: :cascade do |t|
618
+ t.integer "role_id"
619
+ t.integer "permission_subject_id"
620
+ t.boolean "read"
621
+ t.boolean "new"
622
+ t.boolean "edit"
623
+ t.boolean "remove"
624
+ t.datetime "created_at", null: false
625
+ t.datetime "updated_at", null: false
626
+ t.index ["permission_subject_id"], name: "index_c_permissions_on_permission_subject_id", using: :btree
627
+ t.index ["role_id"], name: "index_c_permissions_on_role_id", using: :btree
628
+ end
629
+
630
+ create_table "c_prices", force: :cascade do |t|
631
+ t.integer "without_tax_pennies", default: 0, null: false
632
+ t.string "without_tax_currency", default: "GBP", null: false
633
+ t.datetime "created_at", null: false
634
+ t.datetime "updated_at", null: false
635
+ t.integer "with_tax_pennies", default: 0, null: false
636
+ t.string "with_tax_currency", default: "GBP", null: false
637
+ t.decimal "tax_rate", default: "20.0"
638
+ t.boolean "override", default: false
639
+ end
640
+
641
+ create_table "c_product_add_on_products", force: :cascade do |t|
642
+ t.integer "main_id"
643
+ t.integer "add_on_id"
644
+ t.datetime "created_at", null: false
645
+ t.datetime "updated_at", null: false
646
+ t.index ["add_on_id"], name: "index_c_product_add_on_products_on_add_on_id", using: :btree
647
+ t.index ["main_id"], name: "index_c_product_add_on_products_on_main_id", using: :btree
648
+ end
649
+
650
+ create_table "c_product_barcodes", force: :cascade do |t|
651
+ t.string "value", null: false
652
+ t.integer "symbology", null: false
653
+ t.integer "variant_id"
654
+ t.datetime "created_at", null: false
655
+ t.datetime "updated_at", null: false
656
+ t.index ["value", "symbology"], name: "index_c_product_barcodes_on_value_and_symbology", unique: true, using: :btree
657
+ t.index ["variant_id"], name: "index_c_product_barcodes_on_variant_id", using: :btree
658
+ end
659
+
660
+ create_table "c_product_categorizations", force: :cascade do |t|
661
+ t.integer "product_id"
662
+ t.integer "category_id"
663
+ t.datetime "created_at", null: false
664
+ t.datetime "updated_at", null: false
665
+ t.index ["category_id"], name: "index_c_product_categorizations_on_category_id", using: :btree
666
+ t.index ["product_id"], name: "index_c_product_categorizations_on_product_id", using: :btree
667
+ end
668
+
669
+ create_table "c_product_channel_amazon_bullet_points", force: :cascade do |t|
670
+ t.string "value"
671
+ t.integer "product_channel_id"
672
+ t.datetime "created_at", null: false
673
+ t.datetime "updated_at", null: false
674
+ t.index ["product_channel_id"], name: "index_amzn_bullet_points_on_product_channel_id", using: :btree
675
+ end
676
+
677
+ create_table "c_product_channel_amazon_search_terms", force: :cascade do |t|
678
+ t.string "term"
679
+ t.integer "product_channel_id"
680
+ t.datetime "created_at", null: false
681
+ t.datetime "updated_at", null: false
682
+ t.index ["product_channel_id"], name: "index_amzn_search_terms_on_product_channel_id", using: :btree
683
+ end
684
+
685
+ create_table "c_product_channel_amazons", force: :cascade do |t|
686
+ t.integer "master_id"
687
+ t.string "name"
688
+ t.text "recommended_browse_nodes"
689
+ t.text "description"
690
+ t.text "features"
691
+ t.text "key_product_features"
692
+ t.text "condition_note"
693
+ t.integer "current_price_pennies", default: 0, null: false
694
+ t.string "current_price_currency", default: "GBP", null: false
695
+ t.integer "de_price_pennies", default: 0, null: false
696
+ t.string "de_price_currency", default: "GBP", null: false
697
+ t.integer "es_price_pennies", default: 0, null: false
698
+ t.string "es_price_currency", default: "GBP", null: false
699
+ t.integer "fr_price_pennies", default: 0, null: false
700
+ t.string "fr_price_currency", default: "GBP", null: false
701
+ t.integer "it_price_pennies", default: 0, null: false
702
+ t.string "it_price_currency", default: "GBP", null: false
703
+ t.integer "shipping_cost_pennies", default: 0, null: false
704
+ t.string "shipping_cost_currency", default: "GBP", null: false
705
+ t.datetime "created_at", null: false
706
+ t.datetime "updated_at", null: false
707
+ t.integer "product_type_id"
708
+ t.integer "amazon_category_id"
709
+ t.boolean "last_push_success"
710
+ t.json "last_push_body"
711
+ t.index ["amazon_category_id"], name: "index_c_product_channel_amazons_on_amazon_category_id", using: :btree
712
+ t.index ["master_id"], name: "index_c_product_channel_amazons_on_master_id", using: :btree
713
+ t.index ["product_type_id"], name: "index_c_product_channel_amazons_on_product_type_id", using: :btree
714
+ end
715
+
716
+ create_table "c_product_channel_ebay_ship_to_locations", force: :cascade do |t|
717
+ t.integer "ebay_id"
718
+ t.integer "location"
719
+ t.datetime "created_at", null: false
720
+ t.datetime "updated_at", null: false
721
+ t.index ["ebay_id"], name: "index_c_product_channel_ebay_ship_to_locations_on_ebay_id", using: :btree
722
+ end
723
+
724
+ create_table "c_product_channel_ebays", force: :cascade do |t|
725
+ t.integer "master_id"
726
+ t.string "name"
727
+ t.string "sub_title"
728
+ t.integer "category_id"
729
+ t.text "body"
730
+ t.boolean "ended", default: false
731
+ t.integer "condition"
732
+ t.string "condition_description"
733
+ t.string "country"
734
+ t.integer "dispatch_time"
735
+ t.string "duration"
736
+ t.integer "start_price_pennies", default: 0, null: false
737
+ t.string "start_price_currency", default: "GBP", null: false
738
+ t.boolean "payment_method_paypal"
739
+ t.boolean "payment_method_postal"
740
+ t.boolean "payment_method_cheque"
741
+ t.boolean "payment_method_other"
742
+ t.boolean "payment_method_cc"
743
+ t.boolean "payment_method_escrow"
744
+ t.string "postcode", default: "NR24AQ"
745
+ t.string "domestic_shipping_type"
746
+ t.integer "domestic_shipping_service_cost_pennies", default: 0, null: false
747
+ t.string "domestic_shipping_service_cost_currency", default: "GBP", null: false
748
+ t.integer "domestic_shipping_service_additional_cost_pennies", default: 0, null: false
749
+ t.string "domestic_shipping_service_additional_cost_currency", default: "GBP", null: false
750
+ t.boolean "free_shipping"
751
+ t.boolean "pickup_in_store"
752
+ t.boolean "click_collect_collection_available"
753
+ t.integer "international_shipping_service_id"
754
+ t.integer "international_shipping_service_cost_pennies", default: 0, null: false
755
+ t.string "international_shipping_service_cost_currency", default: "GBP", null: false
756
+ t.integer "international_shipping_service_additional_cost_pennies", default: 0, null: false
757
+ t.string "international_shipping_service_additional_cost_currency", default: "GBP", null: false
758
+ t.boolean "returns_accepted"
759
+ t.string "restocking_fee_value_option"
760
+ t.string "returns_description"
761
+ t.string "refund_option"
762
+ t.string "returns_within"
763
+ t.string "returns_cost_paid_by"
764
+ t.boolean "warranty_offered"
765
+ t.string "warranty_duration"
766
+ t.string "warranty_type"
767
+ t.datetime "created_at", null: false
768
+ t.datetime "updated_at", null: false
769
+ t.integer "delivery_service_id"
770
+ t.boolean "sold", default: false
771
+ t.index ["category_id"], name: "index_c_product_channel_ebays_on_category_id", using: :btree
772
+ t.index ["master_id"], name: "index_c_product_channel_ebays_on_master_id", using: :btree
773
+ end
774
+
775
+ create_table "c_product_channel_images", force: :cascade do |t|
776
+ t.string "channel_type"
777
+ t.integer "channel_id"
778
+ t.integer "image_id"
779
+ t.string "name"
780
+ t.integer "order"
781
+ t.datetime "created_at", null: false
782
+ t.datetime "updated_at", null: false
783
+ t.index ["channel_type", "channel_id"], name: "index_c_product_channel_images_on_channel_type_and_channel_id", using: :btree
784
+ t.index ["image_id"], name: "index_c_product_channel_images_on_image_id", using: :btree
785
+ end
786
+
787
+ create_table "c_product_channel_webs", force: :cascade do |t|
788
+ t.integer "master_id"
789
+ t.string "name"
790
+ t.text "description"
791
+ t.text "features"
792
+ t.text "specification"
793
+ t.integer "current_price_pennies"
794
+ t.string "current_price_currency", default: "GBP", null: false
795
+ t.integer "discount_price_pennies"
796
+ t.string "discount_price_currency", default: "GBP", null: false
797
+ t.datetime "created_at", null: false
798
+ t.datetime "updated_at", null: false
799
+ t.string "subtitle"
800
+ t.index ["master_id"], name: "index_c_product_channel_webs_on_master_id", using: :btree
801
+ end
802
+
803
+ create_table "c_product_images", force: :cascade do |t|
804
+ t.integer "master_id"
805
+ t.integer "variant_id"
806
+ t.string "image"
807
+ t.datetime "created_at", null: false
808
+ t.datetime "updated_at", null: false
809
+ t.index ["master_id"], name: "index_c_product_images_on_master_id", using: :btree
810
+ t.index ["variant_id"], name: "index_c_product_images_on_variant_id", using: :btree
811
+ end
812
+
813
+ create_table "c_product_masters", force: :cascade do |t|
814
+ t.integer "brand_id"
815
+ t.integer "manufacturer_id"
816
+ t.integer "condition"
817
+ t.datetime "created_at", null: false
818
+ t.datetime "updated_at", null: false
819
+ t.decimal "tax_rate", default: "20.0"
820
+ t.index ["brand_id"], name: "index_c_product_masters_on_brand_id", using: :btree
821
+ end
822
+
823
+ create_table "c_product_price_matches", force: :cascade do |t|
824
+ t.integer "competitor"
825
+ t.integer "variant_id"
826
+ t.string "url"
827
+ t.integer "price_pennies", default: 0, null: false
828
+ t.string "price_currency", default: "GBP", null: false
829
+ t.datetime "created_at", null: false
830
+ t.datetime "updated_at", null: false
831
+ t.index ["variant_id"], name: "index_c_product_price_matches_on_variant_id", using: :btree
832
+ end
833
+
834
+ create_table "c_product_product_relations", force: :cascade do |t|
835
+ t.integer "product_id"
836
+ t.integer "related_id"
837
+ t.datetime "created_at", null: false
838
+ t.datetime "updated_at", null: false
839
+ t.index ["product_id", "related_id"], name: "index_c_product_product_relations_on_product_id_and_related_id", unique: true, using: :btree
840
+ t.index ["product_id"], name: "index_c_product_product_relations_on_product_id", using: :btree
841
+ t.index ["related_id"], name: "index_c_product_product_relations_on_related_id", using: :btree
842
+ end
843
+
844
+ create_table "c_product_property_keys", force: :cascade do |t|
845
+ t.string "key"
846
+ t.datetime "created_at", null: false
847
+ t.datetime "updated_at", null: false
848
+ end
849
+
850
+ create_table "c_product_property_values", force: :cascade do |t|
851
+ t.string "value"
852
+ t.integer "property_key_id"
853
+ t.integer "variant_id"
854
+ t.datetime "created_at", null: false
855
+ t.datetime "updated_at", null: false
856
+ t.index ["property_key_id", "value", "variant_id"], name: "property_value_validation_index", unique: true, using: :btree
857
+ t.index ["property_key_id"], name: "index_c_product_property_values_on_property_key_id", using: :btree
858
+ t.index ["variant_id"], name: "index_c_product_property_values_on_variant_id", using: :btree
859
+ end
860
+
861
+ create_table "c_product_reservations", force: :cascade do |t|
862
+ t.string "name"
863
+ t.string "email"
864
+ t.string "phone"
865
+ t.integer "product_variant_id"
866
+ t.datetime "created_at", null: false
867
+ t.datetime "updated_at", null: false
868
+ end
869
+
870
+ create_table "c_product_variants", force: :cascade do |t|
871
+ t.integer "master_id"
872
+ t.integer "country_of_manufacture_id"
873
+ t.string "name"
874
+ t.text "description"
875
+ t.string "sku"
876
+ t.string "asin"
877
+ t.string "mpn"
878
+ t.integer "cost_price_pennies", default: 0, null: false
879
+ t.string "cost_price_currency", default: "GBP", null: false
880
+ t.integer "rrp_pennies", default: 0, null: false
881
+ t.string "rrp_currency", default: "GBP", null: false
882
+ t.decimal "weight", default: "0.0"
883
+ t.string "weight_unit", default: "KG"
884
+ t.decimal "x_dimension", default: "0.0"
885
+ t.decimal "y_dimension", default: "0.0"
886
+ t.decimal "z_dimension", default: "0.0"
887
+ t.string "dimension_unit", default: "M"
888
+ t.integer "current_stock", default: 0
889
+ t.integer "package_quantity", default: 1
890
+ t.boolean "discontinued", default: false
891
+ t.boolean "published", default: true
892
+ t.boolean "published_web", default: true
893
+ t.boolean "published_ebay", default: false
894
+ t.boolean "published_amazon", default: false
895
+ t.datetime "created_at", null: false
896
+ t.datetime "updated_at", null: false
897
+ t.boolean "featured", default: false
898
+ t.integer "status", default: 0
899
+ t.string "url_alias"
900
+ t.integer "product_tag", default: 1
901
+ t.integer "delivery_override_pennies", default: 0, null: false
902
+ t.string "delivery_override_currency", default: "GBP", null: false
903
+ t.boolean "sticky", default: false
904
+ t.integer "web_price_id"
905
+ t.integer "amazon_price_id"
906
+ t.integer "ebay_price_id"
907
+ t.integer "retail_price_id"
908
+ t.string "manufacturer_product_url"
909
+ t.boolean "main_variant"
910
+ t.boolean "has_been_pushed_to_amazon", default: false
911
+ t.boolean "has_been_pushed_to_ebay", default: false
912
+ t.string "item_id"
913
+ t.json "ebay_last_push_body"
914
+ t.boolean "ebay_last_push_success"
915
+ t.boolean "has_delivery_override", default: false
916
+ t.index ["amazon_price_id"], name: "index_c_product_variants_on_amazon_price_id", using: :btree
917
+ t.index ["country_of_manufacture_id"], name: "index_c_product_variants_on_country_of_manufacture_id", using: :btree
918
+ t.index ["ebay_price_id"], name: "index_c_product_variants_on_ebay_price_id", using: :btree
919
+ t.index ["master_id"], name: "index_c_product_variants_on_master_id", using: :btree
920
+ t.index ["retail_price_id"], name: "index_c_product_variants_on_retail_price_id", using: :btree
921
+ t.index ["sku"], name: "index_c_product_variants_on_sku", unique: true, using: :btree
922
+ t.index ["web_price_id"], name: "index_c_product_variants_on_web_price_id", using: :btree
923
+ end
924
+
925
+ create_table "c_projects", force: :cascade do |t|
926
+ t.string "name"
927
+ t.text "body"
928
+ t.string "url_alias"
929
+ t.datetime "created_at", null: false
930
+ t.datetime "updated_at", null: false
931
+ end
932
+
933
+ create_table "c_redirects", force: :cascade do |t|
934
+ t.string "old_url"
935
+ t.string "new_url"
936
+ t.datetime "last_used"
937
+ t.integer "used_counter", default: 0
938
+ t.datetime "created_at", null: false
939
+ t.datetime "updated_at", null: false
940
+ end
941
+
942
+ create_table "c_roles", force: :cascade do |t|
943
+ t.string "name"
944
+ t.text "body"
945
+ t.datetime "created_at", null: false
946
+ t.datetime "updated_at", null: false
947
+ end
948
+
949
+ create_table "c_sales_highlights", force: :cascade do |t|
950
+ t.string "image"
951
+ t.string "url"
952
+ t.datetime "created_at", null: false
953
+ t.datetime "updated_at", null: false
954
+ t.string "color"
955
+ end
956
+
957
+ create_table "c_setting_groups", force: :cascade do |t|
958
+ t.string "name"
959
+ t.string "machine_name"
960
+ t.text "body"
961
+ t.datetime "created_at", null: false
962
+ t.datetime "updated_at", null: false
963
+ end
964
+
965
+ create_table "c_setting_type_booleans", force: :cascade do |t|
966
+ t.boolean "value"
967
+ t.boolean "default"
968
+ t.datetime "created_at", null: false
969
+ t.datetime "updated_at", null: false
970
+ end
971
+
972
+ create_table "c_setting_type_images", force: :cascade do |t|
973
+ t.string "value"
974
+ t.string "default"
975
+ t.string "default_string"
976
+ t.datetime "created_at", null: false
977
+ t.datetime "updated_at", null: false
978
+ end
979
+
980
+ create_table "c_setting_type_strings", force: :cascade do |t|
981
+ t.string "value"
982
+ t.string "default"
983
+ t.datetime "created_at", null: false
984
+ t.datetime "updated_at", null: false
985
+ end
986
+
987
+ create_table "c_setting_type_texts", force: :cascade do |t|
988
+ t.string "value"
989
+ t.string "default"
990
+ t.datetime "created_at", null: false
991
+ t.datetime "updated_at", null: false
992
+ end
993
+
994
+ create_table "c_settings", force: :cascade do |t|
995
+ t.string "key"
996
+ t.string "data_type"
997
+ t.integer "data_id"
998
+ t.integer "setting_group_id"
999
+ t.datetime "created_at", null: false
1000
+ t.datetime "updated_at", null: false
1001
+ t.index ["data_id", "data_type"], name: "index_c_settings_on_data_id_and_data_type", unique: true, using: :btree
1002
+ t.index ["data_type", "data_id"], name: "index_c_settings_on_data_type_and_data_id", using: :btree
1003
+ t.index ["key"], name: "index_c_settings_on_key", unique: true, using: :btree
1004
+ t.index ["setting_group_id"], name: "index_c_settings_on_setting_group_id", using: :btree
1005
+ end
1006
+
1007
+ create_table "c_slides", force: :cascade do |t|
1008
+ t.string "name"
1009
+ t.string "url"
1010
+ t.string "image"
1011
+ t.integer "slideshow_id"
1012
+ t.datetime "created_at", null: false
1013
+ t.datetime "updated_at", null: false
1014
+ t.index ["slideshow_id"], name: "index_c_slides_on_slideshow_id", using: :btree
1015
+ end
1016
+
1017
+ create_table "c_slideshows", force: :cascade do |t|
1018
+ t.string "name"
1019
+ t.string "machine_name"
1020
+ t.datetime "created_at", null: false
1021
+ t.datetime "updated_at", null: false
1022
+ t.text "body"
1023
+ end
1024
+
1025
+ create_table "c_team_members", force: :cascade do |t|
1026
+ t.string "name"
1027
+ t.string "role"
1028
+ t.string "image"
1029
+ t.text "body"
1030
+ t.datetime "created_at", null: false
1031
+ t.datetime "updated_at", null: false
1032
+ end
1033
+
1034
+ create_table "c_testimonials", force: :cascade do |t|
1035
+ t.text "quote"
1036
+ t.string "author"
1037
+ t.integer "project_id"
1038
+ t.datetime "created_at", null: false
1039
+ t.datetime "updated_at", null: false
1040
+ end
1041
+
1042
+ create_table "c_user_roles", force: :cascade do |t|
1043
+ t.integer "user_id"
1044
+ t.integer "role_id"
1045
+ t.datetime "created_at", null: false
1046
+ t.datetime "updated_at", null: false
1047
+ t.index ["role_id"], name: "index_c_user_roles_on_role_id", using: :btree
1048
+ t.index ["user_id"], name: "index_c_user_roles_on_user_id", using: :btree
1049
+ end
1050
+
1051
+ create_table "c_users", force: :cascade do |t|
1052
+ t.string "name"
1053
+ t.string "email", default: "", null: false
1054
+ t.string "encrypted_password", default: "", null: false
1055
+ t.string "reset_password_token"
1056
+ t.datetime "reset_password_sent_at"
1057
+ t.datetime "remember_created_at"
1058
+ t.integer "sign_in_count", default: 0, null: false
1059
+ t.datetime "current_sign_in_at"
1060
+ t.datetime "last_sign_in_at"
1061
+ t.string "current_sign_in_ip"
1062
+ t.string "last_sign_in_ip"
1063
+ t.datetime "created_at", null: false
1064
+ t.datetime "updated_at", null: false
1065
+ t.boolean "cd2admin", default: false
1066
+ t.index ["email"], name: "index_c_users_on_email", unique: true, using: :btree
1067
+ t.index ["reset_password_token"], name: "index_c_users_on_reset_password_token", unique: true, using: :btree
1068
+ end
1069
+
1070
+ create_table "c_weights", force: :cascade do |t|
1071
+ t.integer "value"
1072
+ t.string "orderable_type"
1073
+ t.integer "orderable_id"
1074
+ t.datetime "created_at", null: false
1075
+ t.datetime "updated_at", null: false
1076
+ t.index ["orderable_type", "orderable_id"], name: "index_c_weights_on_orderable_type_and_orderable_id", using: :btree
1077
+ end
1078
+
1079
+ create_table "c_zones", force: :cascade do |t|
1080
+ t.string "name"
1081
+ end
1082
+
1083
+ create_table "ckeditor_assets", force: :cascade do |t|
1084
+ t.string "data_file_name", null: false
1085
+ t.string "data_content_type"
1086
+ t.integer "data_file_size"
1087
+ t.integer "assetable_id"
1088
+ t.string "assetable_type", limit: 30
1089
+ t.string "type", limit: 30
1090
+ t.integer "width"
1091
+ t.integer "height"
1092
+ t.datetime "created_at", null: false
1093
+ t.datetime "updated_at", null: false
1094
+ t.index ["assetable_type", "assetable_id"], name: "idx_ckeditor_assetable", using: :btree
1095
+ t.index ["assetable_type", "type", "assetable_id"], name: "idx_ckeditor_assetable_type", using: :btree
1096
+ end
1097
+
1098
+ add_foreign_key "c_carts", "c_customers", column: "customer_id"
1099
+ add_foreign_key "c_categories", "c_categories", column: "parent_id", on_delete: :nullify
1100
+ add_foreign_key "c_menu_items", "c_menu_items", column: "parent_id", on_delete: :nullify
1101
+ add_foreign_key "c_product_channel_amazons", "c_product_masters", column: "master_id", on_delete: :restrict
1102
+ add_foreign_key "c_product_channel_ebays", "c_product_masters", column: "master_id", on_delete: :restrict
1103
+ add_foreign_key "c_product_channel_images", "c_product_images", column: "image_id", on_delete: :nullify
1104
+ add_foreign_key "c_product_channel_webs", "c_product_masters", column: "master_id", on_delete: :restrict
1105
+ add_foreign_key "c_product_images", "c_product_masters", column: "master_id", on_delete: :cascade
1106
+ add_foreign_key "c_product_images", "c_product_variants", column: "variant_id", on_delete: :nullify
1107
+ add_foreign_key "c_product_masters", "c_brands", column: "brand_id", on_delete: :nullify
1108
+ add_foreign_key "c_product_variants", "c_countries", column: "country_of_manufacture_id", on_delete: :restrict
1109
+ add_foreign_key "c_product_variants", "c_product_masters", column: "master_id", on_delete: :cascade
1110
+ end