catarse_full 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +19 -0
- data/README.rdoc +3 -0
- data/Rakefile +45 -0
- data/app/assets/fonts/icomoon.eot +0 -0
- data/app/assets/fonts/icomoon.json +1 -0
- data/app/assets/fonts/icomoon.svg +30 -0
- data/app/assets/fonts/icomoon.ttf +0 -0
- data/app/assets/fonts/icomoon.woff +0 -0
- data/app/assets/images/.gitkeep +0 -0
- data/app/assets/images/auth/facebook_64.png +0 -0
- data/app/assets/images/auth/twitter_64.png +0 -0
- data/app/assets/images/catarse/ProjectUpdate.jpg +0 -0
- data/app/assets/images/catarse/back_icons.png +0 -0
- data/app/assets/images/catarse/back_statistics.gif +0 -0
- data/app/assets/images/catarse/backed_icon.png +0 -0
- data/app/assets/images/catarse/backer_city.png +0 -0
- data/app/assets/images/catarse/backer_info.gif +0 -0
- data/app/assets/images/catarse/backer_info.png +0 -0
- data/app/assets/images/catarse/background.png +0 -0
- data/app/assets/images/catarse/background_full.jpg +0 -0
- data/app/assets/images/catarse/banner-10-milhoes.png +0 -0
- data/app/assets/images/catarse/bg64x64_s3.png +0 -0
- data/app/assets/images/catarse/bg_air.jpg +0 -0
- data/app/assets/images/catarse/bg_explore.jpg +0 -0
- data/app/assets/images/catarse/bg_finish.jpg +0 -0
- data/app/assets/images/catarse/bg_guardian.jpg +0 -0
- data/app/assets/images/catarse/bg_heartbacker.jpg +0 -0
- data/app/assets/images/catarse/bg_money.jpg +0 -0
- data/app/assets/images/catarse/bg_moneytag.jpg +0 -0
- data/app/assets/images/catarse/bg_requirements.png +0 -0
- data/app/assets/images/catarse/bg_rewards.jpg +0 -0
- data/app/assets/images/catarse/bg_s3.png +0 -0
- data/app/assets/images/catarse/bg_send.png +0 -0
- data/app/assets/images/catarse/bg_steps.png +0 -0
- data/app/assets/images/catarse/bg_tips.png +0 -0
- data/app/assets/images/catarse/bg_tips1.png +0 -0
- data/app/assets/images/catarse/bg_tips2.png +0 -0
- data/app/assets/images/catarse/bg_tips3.png +0 -0
- data/app/assets/images/catarse/bg_tips4.png +0 -0
- data/app/assets/images/catarse/bg_tips5.png +0 -0
- data/app/assets/images/catarse/bg_tips6.png +0 -0
- data/app/assets/images/catarse/bg_tips7.png +0 -0
- data/app/assets/images/catarse/bg_tips8.png +0 -0
- data/app/assets/images/catarse/blog_icon17x14.png +0 -0
- data/app/assets/images/catarse/boleto_icon.png +0 -0
- data/app/assets/images/catarse/bot_guidelines.gif +0 -0
- data/app/assets/images/catarse/bot_profileUser.png +0 -0
- data/app/assets/images/catarse/box_alert.png +0 -0
- data/app/assets/images/catarse/box_download.png +0 -0
- data/app/assets/images/catarse/box_en.jpg +0 -0
- data/app/assets/images/catarse/box_pt.jpg +0 -0
- data/app/assets/images/catarse/bullet-green.png +0 -0
- data/app/assets/images/catarse/button_explore.png +0 -0
- data/app/assets/images/catarse/button_send.png +0 -0
- data/app/assets/images/catarse/category_icon14x14.png +0 -0
- data/app/assets/images/catarse/cc_icon.png +0 -0
- data/app/assets/images/catarse/comments_icon28x18.png +0 -0
- data/app/assets/images/catarse/comum_logo127x27.png +0 -0
- data/app/assets/images/catarse/confirmed_icon.png +0 -0
- data/app/assets/images/catarse/delete_16.png +0 -0
- data/app/assets/images/catarse/embed_icon19x9.png +0 -0
- data/app/assets/images/catarse/expiring_icon20x22.png +0 -0
- data/app/assets/images/catarse/explore_icon21x14.png +0 -0
- data/app/assets/images/catarse/explore_icon23x15.png +0 -0
- data/app/assets/images/catarse/facebook_black_icon.png +0 -0
- data/app/assets/images/catarse/facebook_icon13x26.png +0 -0
- data/app/assets/images/catarse/faq_icon18x18.png +0 -0
- data/app/assets/images/catarse/faq_video.png +0 -0
- data/app/assets/images/catarse/flagCity.png +0 -0
- data/app/assets/images/catarse/flagCityMg.png +0 -0
- data/app/assets/images/catarse/flagCityPoa.png +0 -0
- data/app/assets/images/catarse/flagCityRJ.png +0 -0
- data/app/assets/images/catarse/flagName.png +0 -0
- data/app/assets/images/catarse/flagNameMg.png +0 -0
- data/app/assets/images/catarse/flagNamePoa.png +0 -0
- data/app/assets/images/catarse/flagNameRJ.png +0 -0
- data/app/assets/images/catarse/flagNameSP.png +0 -0
- data/app/assets/images/catarse/gift-reward.png +0 -0
- data/app/assets/images/catarse/gift.png +0 -0
- data/app/assets/images/catarse/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/catarse/glyphicons-halflings.png +0 -0
- data/app/assets/images/catarse/goal_icon36x17.png +0 -0
- data/app/assets/images/catarse/grey.png +0 -0
- data/app/assets/images/catarse/heart_icon17x14.png +0 -0
- data/app/assets/images/catarse/icon-fb.png +0 -0
- data/app/assets/images/catarse/icon-moip.png +0 -0
- data/app/assets/images/catarse/icon-paypal.png +0 -0
- data/app/assets/images/catarse/icon-tw.png +0 -0
- data/app/assets/images/catarse/icon_about.png +0 -0
- data/app/assets/images/catarse/icon_backerstep1.png +0 -0
- data/app/assets/images/catarse/icon_backerstep2.png +0 -0
- data/app/assets/images/catarse/icon_backerstep3.png +0 -0
- data/app/assets/images/catarse/icon_backerstep4.png +0 -0
- data/app/assets/images/catarse/icon_backerstep5.png +0 -0
- data/app/assets/images/catarse/icon_backersucessfull.png +0 -0
- data/app/assets/images/catarse/icon_backproject.png +0 -0
- data/app/assets/images/catarse/icon_bold.png +0 -0
- data/app/assets/images/catarse/icon_calc.png +0 -0
- data/app/assets/images/catarse/icon_colective.png +0 -0
- data/app/assets/images/catarse/icon_creative.png +0 -0
- data/app/assets/images/catarse/icon_credits.png +0 -0
- data/app/assets/images/catarse/icon_creditsmoney.png +0 -0
- data/app/assets/images/catarse/icon_datestart.png +0 -0
- data/app/assets/images/catarse/icon_donation.png +0 -0
- data/app/assets/images/catarse/icon_faq.png +0 -0
- data/app/assets/images/catarse/icon_gift.png +0 -0
- data/app/assets/images/catarse/icon_guidebacker.png +0 -0
- data/app/assets/images/catarse/icon_guidelinesstart.png +0 -0
- data/app/assets/images/catarse/icon_heart.png +0 -0
- data/app/assets/images/catarse/icon_italic.png +0 -0
- data/app/assets/images/catarse/icon_licosts.png +0 -0
- data/app/assets/images/catarse/icon_limagic.png +0 -0
- data/app/assets/images/catarse/icon_limoney.png +0 -0
- data/app/assets/images/catarse/icon_link.png +0 -0
- data/app/assets/images/catarse/icon_linktext.png +0 -0
- data/app/assets/images/catarse/icon_liwork.png +0 -0
- data/app/assets/images/catarse/icon_logo.png +0 -0
- data/app/assets/images/catarse/icon_media.png +0 -0
- data/app/assets/images/catarse/icon_new.png +0 -0
- data/app/assets/images/catarse/icon_nonprofit.png +0 -0
- data/app/assets/images/catarse/icon_projectnotfunded.png +0 -0
- data/app/assets/images/catarse/icon_projectsuccess.png +0 -0
- data/app/assets/images/catarse/icon_refreshproject.png +0 -0
- data/app/assets/images/catarse/icon_rewards.png +0 -0
- data/app/assets/images/catarse/icon_social.png +0 -0
- data/app/assets/images/catarse/icon_soldout.png +0 -0
- data/app/assets/images/catarse/icon_step1.png +0 -0
- data/app/assets/images/catarse/icon_step2.png +0 -0
- data/app/assets/images/catarse/icon_step3.png +0 -0
- data/app/assets/images/catarse/icon_step4.png +0 -0
- data/app/assets/images/catarse/icon_submitbacker.png +0 -0
- data/app/assets/images/catarse/icon_tag.png +0 -0
- data/app/assets/images/catarse/icon_time.png +0 -0
- data/app/assets/images/catarse/icon_url.png +0 -0
- data/app/assets/images/catarse/icon_video.png +0 -0
- data/app/assets/images/catarse/icon_vimeo.png +0 -0
- data/app/assets/images/catarse/institutional_video_icon16x16.png +0 -0
- data/app/assets/images/catarse/label_green.png +0 -0
- data/app/assets/images/catarse/label_green_list.png +0 -0
- data/app/assets/images/catarse/label_orange.png +0 -0
- data/app/assets/images/catarse/label_orange_list.png +0 -0
- data/app/assets/images/catarse/link_icon14x14.png +0 -0
- data/app/assets/images/catarse/logo-fb.jpg +0 -0
- data/app/assets/images/catarse/logo.png +0 -0
- data/app/assets/images/catarse/min_star12x11.png +0 -0
- data/app/assets/images/catarse/moip-choice.png +0 -0
- data/app/assets/images/catarse/multide_logo55x36.png +0 -0
- data/app/assets/images/catarse/newsletter_icon18x15.png +0 -0
- data/app/assets/images/catarse/opendata_icon26x26.png +0 -0
- data/app/assets/images/catarse/partners_icon26x26.png +0 -0
- data/app/assets/images/catarse/payment_account.jpg +0 -0
- data/app/assets/images/catarse/payment_boleto.jpg +0 -0
- data/app/assets/images/catarse/payment_cards.jpg +0 -0
- data/app/assets/images/catarse/paypal-choice.png +0 -0
- data/app/assets/images/catarse/pencil_16.png +0 -0
- data/app/assets/images/catarse/play89x89.png +0 -0
- data/app/assets/images/catarse/post_title_image.png +0 -0
- data/app/assets/images/catarse/power_logo200x43.png +0 -0
- data/app/assets/images/catarse/profile_icon19x14.png +0 -0
- data/app/assets/images/catarse/project_about.png +0 -0
- data/app/assets/images/catarse/recents_icon18x23.png +0 -0
- data/app/assets/images/catarse/recents_icon31x17.png +0 -0
- data/app/assets/images/catarse/recompensa24x20.png +0 -0
- data/app/assets/images/catarse/reward_box.png +0 -0
- data/app/assets/images/catarse/reward_count_icon18x17.png +0 -0
- data/app/assets/images/catarse/reward_icon.png +0 -0
- data/app/assets/images/catarse/schedule_icon19x22.png +0 -0
- data/app/assets/images/catarse/search_submit15x15.png +0 -0
- data/app/assets/images/catarse/sidebar_backers_icon26x19.png +0 -0
- data/app/assets/images/catarse/social_big_icons.png +0 -0
- data/app/assets/images/catarse/social_icons.png +0 -0
- data/app/assets/images/catarse/submit_back_icon25x22.png +0 -0
- data/app/assets/images/catarse/submit_project_icon25x13.png +0 -0
- data/app/assets/images/catarse/team_adriano.jpg +0 -0
- data/app/assets/images/catarse/team_diego.jpg +0 -0
- data/app/assets/images/catarse/team_diogo.jpg +0 -0
- data/app/assets/images/catarse/team_evelise.jpg +0 -0
- data/app/assets/images/catarse/team_luciana.jpg +0 -0
- data/app/assets/images/catarse/team_luis.jpg +0 -0
- data/app/assets/images/catarse/team_renato.jpg +0 -0
- data/app/assets/images/catarse/team_rodrigo.jpg +0 -0
- data/app/assets/images/catarse/team_ton.jpg +0 -0
- data/app/assets/images/catarse/thumb_step.jpg +0 -0
- data/app/assets/images/catarse/thumbs_up_icon16x16.png +0 -0
- data/app/assets/images/catarse/tick_16.png +0 -0
- data/app/assets/images/catarse/time_icon19x30.png +0 -0
- data/app/assets/images/catarse/title_component149x40.png +0 -0
- data/app/assets/images/catarse/title_component241x40.png +0 -0
- data/app/assets/images/catarse/twitter_black_icon.png +0 -0
- data/app/assets/images/catarse/twitter_icon28x24.png +0 -0
- data/app/assets/images/catarse/video_sample_cover477x330.jpg +0 -0
- data/app/assets/images/catarse_bootstrap/botao_bemvindo_EN_big.png +0 -0
- data/app/assets/images/catarse_bootstrap/botao_bemvindo_PT_big.png +0 -0
- data/app/assets/images/catarse_bootstrap/catarse-assets.png +0 -0
- data/app/assets/images/catarse_bootstrap/feedback-close.png +0 -0
- data/app/assets/images/catarse_bootstrap/feedback-key.png +0 -0
- data/app/assets/images/catarse_bootstrap/feedback-open.png +0 -0
- data/app/assets/images/catarse_bootstrap/logo_icon_catarse.png +0 -0
- data/app/assets/images/catarse_full/.gitkeep +0 -0
- data/app/assets/images/channels/avatar.png +0 -0
- data/app/assets/images/channels/banner.png +0 -0
- data/app/assets/images/channels/banner_tile.jpg +0 -0
- data/app/assets/images/channels/capa_asas.jpg +0 -0
- data/app/assets/images/channels/header_system.png +0 -0
- data/app/assets/images/channels/logo_asas_notificacao.png +0 -0
- data/app/assets/images/channels/successful.png +0 -0
- data/app/assets/images/delete_16.png +0 -0
- data/app/assets/images/dropdown.png +0 -0
- data/app/assets/images/facebook_share.png +0 -0
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/images/gravatar.png +0 -0
- data/app/assets/images/icon_alertheader.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-small_0_aaaaaa_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_15_444444_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_diagonals-thick_95_ffdc2e_40x40.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_glass_55_fbf5d0_1x400.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-hard_30_285c00_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_33_3a8104_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_50_4eb305_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_highlight-soft_60_4ca20b_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-bg_inset-soft_10_285c00_1x100.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_4eb305_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_72b42d_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
- data/app/assets/images/list_cards.jpg +0 -0
- data/app/assets/images/loading.gif +0 -0
- data/app/assets/images/locales/en.png +0 -0
- data/app/assets/images/locales/es.png +0 -0
- data/app/assets/images/locales/list.txt +278 -0
- data/app/assets/images/locales/pt.png +0 -0
- data/app/assets/images/login_with_facebook_button310x60.png +0 -0
- data/app/assets/images/login_with_facebook_button356x60.png +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/not_successful.en.png +0 -0
- data/app/assets/images/not_successful.es.png +0 -0
- data/app/assets/images/not_successful.pt.png +0 -0
- data/app/assets/images/pencil_16.png +0 -0
- data/app/assets/images/project_about.png +0 -0
- data/app/assets/images/project_menu_selected.png +0 -0
- data/app/assets/images/rewards_left_border.png +0 -0
- data/app/assets/images/rewards_right_border.png +0 -0
- data/app/assets/images/successful.en.png +0 -0
- data/app/assets/images/successful.es.png +0 -0
- data/app/assets/images/successful.pt.png +0 -0
- data/app/assets/images/tick_16.png +0 -0
- data/app/assets/images/tick_32.png +0 -0
- data/app/assets/images/twitter_share.png +0 -0
- data/app/assets/images/user.png +0 -0
- data/app/assets/images/waiting_confirmation.en.png +0 -0
- data/app/assets/images/waiting_confirmation.es.png +0 -0
- data/app/assets/images/waiting_confirmation.pt.png +0 -0
- data/app/assets/javascripts/.gitkeep +0 -0
- data/app/assets/javascripts/app/.gitkeep +1 -0
- data/app/assets/javascripts/app/adm/users.js +50 -0
- data/app/assets/javascripts/app/app.js +50 -0
- data/app/assets/javascripts/app/backer.js +60 -0
- data/app/assets/javascripts/app/devise/feedback_support.js +23 -0
- data/app/assets/javascripts/app/explore.js +65 -0
- data/app/assets/javascripts/app/mix_panel.js +76 -0
- data/app/assets/javascripts/app/payment.js +23 -0
- data/app/assets/javascripts/app/project.js +47 -0
- data/app/assets/javascripts/app/project/project_backers.js +27 -0
- data/app/assets/javascripts/app/project/project_comments.js +14 -0
- data/app/assets/javascripts/app/project/project_sidebar.js +74 -0
- data/app/assets/javascripts/app/project/updates.js +44 -0
- data/app/assets/javascripts/app/project_form.js +60 -0
- data/app/assets/javascripts/app/registration.js +23 -0
- data/app/assets/javascripts/app/review_form.js +48 -0
- data/app/assets/javascripts/app/user.js +21 -0
- data/app/assets/javascripts/app/user/user_backers.js +15 -0
- data/app/assets/javascripts/app/user/user_projects.js +20 -0
- data/app/assets/javascripts/application.js +23 -0
- data/app/assets/javascripts/catarse_full/.gitkeep +0 -0
- data/app/assets/javascripts/lib/backbone.js +1571 -0
- data/app/assets/javascripts/lib/bootstrap.min.js +7 -0
- data/app/assets/javascripts/lib/form.js +24 -0
- data/app/assets/javascripts/lib/infinite_scroll.js +43 -0
- data/app/assets/javascripts/lib/jquery-ui.js +2252 -0
- data/app/assets/javascripts/lib/jquery.js +8842 -0
- data/app/assets/javascripts/lib/jquery.maskedinput.js +338 -0
- data/app/assets/javascripts/lib/modal.js +43 -0
- data/app/assets/javascripts/lib/skull.js +78 -0
- data/app/assets/javascripts/lib/tabs.js +27 -0
- data/app/assets/javascripts/lib/timed_input.js +18 -0
- data/app/assets/javascripts/lib/twitter.js +1 -0
- data/app/assets/javascripts/lib/underscore.js +1227 -0
- data/app/assets/stylesheets/.gitkeep +0 -0
- data/app/assets/stylesheets/animate.min.css +1 -0
- data/app/assets/stylesheets/application.css.sass +47 -0
- data/app/assets/stylesheets/catarse.css.sass +26 -0
- data/app/assets/stylesheets/catarse.sass +26 -0
- data/app/assets/stylesheets/catarse_bootstrap/_alerts.sass +16 -0
- data/app/assets/stylesheets/catarse_bootstrap/_buttons.sass +35 -0
- data/app/assets/stylesheets/catarse_bootstrap/_colors.sass +39 -0
- data/app/assets/stylesheets/catarse_bootstrap/_dropdown.sass +29 -0
- data/app/assets/stylesheets/catarse_bootstrap/_elements.sass +43 -0
- data/app/assets/stylesheets/catarse_bootstrap/_fonts.sass +46 -0
- data/app/assets/stylesheets/catarse_bootstrap/_header.sass +101 -0
- data/app/assets/stylesheets/catarse_bootstrap/_main_sidebar.sass +91 -0
- data/app/assets/stylesheets/catarse_bootstrap/_notices.sass +27 -0
- data/app/assets/stylesheets/catarse_bootstrap/_project_box.sass +104 -0
- data/app/assets/stylesheets/catarse_bootstrap/_settings.sass +72 -0
- data/app/assets/stylesheets/catarse_bootstrap/grid/foundation.sass +667 -0
- data/app/assets/stylesheets/catarse_bootstrap/grid/normalize.sass +327 -0
- data/app/assets/stylesheets/catarse_bootstrap/pages/devise.sass +102 -0
- data/app/assets/stylesheets/catarse_bootstrap/pages/passwords/new.sass +3 -0
- data/app/assets/stylesheets/catarse_full/.gitkeep +0 -0
- data/app/assets/stylesheets/content/_body.sass +82 -0
- data/app/assets/stylesheets/content/_explore.sass +68 -0
- data/app/assets/stylesheets/content/_footer.sass +88 -0
- data/app/assets/stylesheets/content/_header.sass +102 -0
- data/app/assets/stylesheets/content/_recommended_header.sass +174 -0
- data/app/assets/stylesheets/content/_sessions.sass +111 -0
- data/app/assets/stylesheets/content/_sidebar.sass +179 -0
- data/app/assets/stylesheets/jquery-ui.css.scss +572 -0
- data/app/assets/stylesheets/miv/_alert.scss +57 -0
- data/app/assets/stylesheets/miv/_bootstrap.scss +4652 -0
- data/app/assets/stylesheets/miv/_buttons.sass +41 -0
- data/app/assets/stylesheets/miv/_colors.sass +75 -0
- data/app/assets/stylesheets/miv/_dropdown.sass +28 -0
- data/app/assets/stylesheets/miv/_embed.sass +112 -0
- data/app/assets/stylesheets/miv/_flash.sass +18 -0
- data/app/assets/stylesheets/miv/_form.scss +626 -0
- data/app/assets/stylesheets/miv/_index.sass +151 -0
- data/app/assets/stylesheets/miv/_locales.sass +34 -0
- data/app/assets/stylesheets/miv/_modal.sass +38 -0
- data/app/assets/stylesheets/miv/_overlay.sass +10 -0
- data/app/assets/stylesheets/miv/_projects.sass +159 -0
- data/app/assets/stylesheets/miv/_projects_land.sass +177 -0
- data/app/assets/stylesheets/miv/_table.scss +134 -0
- data/app/assets/stylesheets/miv/_tabs.sass +31 -0
- data/app/assets/stylesheets/resources/adm/adm.sass +109 -0
- data/app/assets/stylesheets/resources/backers/_create.sass +432 -0
- data/app/assets/stylesheets/resources/backers/_new.sass +237 -0
- data/app/assets/stylesheets/resources/backers/_thank_you.sass +83 -0
- data/app/assets/stylesheets/resources/channels/_about.sass +67 -0
- data/app/assets/stylesheets/resources/channels/_general.sass +60 -0
- data/app/assets/stylesheets/resources/channels/_icomoon.sass +47 -0
- data/app/assets/stylesheets/resources/channels/_profile.sass +120 -0
- data/app/assets/stylesheets/resources/projects/_index.sass +43 -0
- data/app/assets/stylesheets/resources/projects/_new.sass +117 -0
- data/app/assets/stylesheets/resources/projects/_pending_backers.sass +80 -0
- data/app/assets/stylesheets/resources/projects/_rewards.sass +22 -0
- data/app/assets/stylesheets/resources/projects/_show.sass +749 -0
- data/app/assets/stylesheets/resources/projects/_start.sass +191 -0
- data/app/assets/stylesheets/resources/static/_about.sass +125 -0
- data/app/assets/stylesheets/resources/static/_default.sass +576 -0
- data/app/assets/stylesheets/resources/users/_show.sass +284 -0
- data/app/controllers/.gitkeep +0 -0
- data/app/controllers/adm/backers_controller.rb +40 -0
- data/app/controllers/adm/base_controller.rb +37 -0
- data/app/controllers/adm/financials_controller.rb +49 -0
- data/app/controllers/adm/projects_controller.rb +32 -0
- data/app/controllers/adm/reports/backer_reports_controller.rb +6 -0
- data/app/controllers/adm/reports/base_controller.rb +6 -0
- data/app/controllers/adm/statistics_controller.rb +6 -0
- data/app/controllers/adm/users_controller.rb +26 -0
- data/app/controllers/application_controller.rb +118 -0
- data/app/controllers/channels/adm/projects_controller.rb +36 -0
- data/app/controllers/channels/adm/reports/subscriber_reports_controller.rb +7 -0
- data/app/controllers/channels/adm/statistics_controller.rb +13 -0
- data/app/controllers/channels/base_controller.rb +6 -0
- data/app/controllers/channels/channels_subscribers_controller.rb +35 -0
- data/app/controllers/channels/profiles_controller.rb +11 -0
- data/app/controllers/channels/projects_controller.rb +22 -0
- data/app/controllers/explore_controller.rb +6 -0
- data/app/controllers/omniauth_callbacks_controller.rb +28 -0
- data/app/controllers/passwords_controller.rb +21 -0
- data/app/controllers/projects/backers_controller.rb +85 -0
- data/app/controllers/projects/updates_controller.rb +28 -0
- data/app/controllers/projects_controller.rb +84 -0
- data/app/controllers/reports/backer_reports_for_project_owners_controller.rb +36 -0
- data/app/controllers/reports/base_controller.rb +6 -0
- data/app/controllers/rewards_controller.rb +36 -0
- data/app/controllers/static_controller.rb +28 -0
- data/app/controllers/unsubscribes_controller.rb +18 -0
- data/app/controllers/users/backers_controller.rb +29 -0
- data/app/controllers/users/projects_controller.rb +13 -0
- data/app/controllers/users_controller.rb +63 -0
- data/app/decorators/channel_decorator.rb +7 -0
- data/app/decorators/project_decorator.rb +69 -0
- data/app/decorators/user_decorator.rb +34 -0
- data/app/helpers/.gitkeep +0 -0
- data/app/helpers/channels/base_helper.rb +2 -0
- data/app/mailers/.gitkeep +0 -0
- data/app/mailers/credits_mailer.rb +9 -0
- data/app/mailers/notifications_mailer.rb +21 -0
- data/app/models/.gitkeep +0 -0
- data/app/models/ability.rb +129 -0
- data/app/models/authorization.rb +4 -0
- data/app/models/backer.rb +242 -0
- data/app/models/backer_report.rb +3 -0
- data/app/models/backer_reports_for_project_owner.rb +2 -0
- data/app/models/backers_by_period.rb +9 -0
- data/app/models/category.rb +17 -0
- data/app/models/channel.rb +22 -0
- data/app/models/channels_subscriber.rb +5 -0
- data/app/models/configuration.rb +36 -0
- data/app/models/notification.rb +35 -0
- data/app/models/notification_type.rb +4 -0
- data/app/models/oauth_provider.rb +6 -0
- data/app/models/payment_notification.rb +4 -0
- data/app/models/project.rb +335 -0
- data/app/models/project_total.rb +2 -0
- data/app/models/projects_by_period.rb +9 -0
- data/app/models/projects_for_home.rb +11 -0
- data/app/models/reward.rb +70 -0
- data/app/models/state.rb +13 -0
- data/app/models/statistics.rb +2 -0
- data/app/models/subscriber_report.rb +3 -0
- data/app/models/unsubscribe.rb +10 -0
- data/app/models/update.rb +57 -0
- data/app/models/user.rb +250 -0
- data/app/models/user_total.rb +3 -0
- data/app/observers/backer_observer.rb +61 -0
- data/app/observers/notification_observer.rb +7 -0
- data/app/observers/payment_notification_observer.rb +16 -0
- data/app/observers/project_observer.rb +113 -0
- data/app/observers/update_observer.rb +7 -0
- data/app/observers/user_observer.rb +16 -0
- data/app/uploaders/image_uploader.rb +24 -0
- data/app/uploaders/project_uploader.rb +29 -0
- data/app/uploaders/user_uploader.rb +12 -0
- data/app/views/.gitkeep +0 -0
- data/app/views/adm/backers/index.html.slim +170 -0
- data/app/views/adm/financials/index.html.slim +99 -0
- data/app/views/adm/projects/index.html.slim +128 -0
- data/app/views/adm/statistics/index.html.slim +40 -0
- data/app/views/adm/users/index.html.slim +74 -0
- data/app/views/catarse_bootstrap/devise/mailer/reset_password_instructions.en.html.slim +15 -0
- data/app/views/catarse_bootstrap/devise/mailer/reset_password_instructions.pt.html.slim +16 -0
- data/app/views/catarse_bootstrap/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/catarse_bootstrap/devise/passwords/edit.html.slim +26 -0
- data/app/views/catarse_bootstrap/devise/passwords/new.html.slim +21 -0
- data/app/views/catarse_bootstrap/devise/registrations/new.html.slim +48 -0
- data/app/views/catarse_bootstrap/devise/sessions/new.html.slim +40 -0
- data/app/views/catarse_bootstrap/devise/shared/_alert.html.slim +11 -0
- data/app/views/catarse_bootstrap/devise/shared/_header.html.slim +5 -0
- data/app/views/catarse_bootstrap/layouts/_login_feedback_support.html.slim +16 -0
- data/app/views/catarse_bootstrap/layouts/_mailer_styles.html.erb +22 -0
- data/app/views/catarse_bootstrap/layouts/_uservoice.html.slim +2 -0
- data/app/views/catarse_bootstrap/layouts/catarse_bootstrap.html.slim +21 -0
- data/app/views/catarse_bootstrap/layouts/email.html.slim +39 -0
- data/app/views/catarse_bootstrap/notifications_mailer/new_user_registration.en.html.slim +44 -0
- data/app/views/catarse_bootstrap/notifications_mailer/new_user_registration.pt.html.slim +45 -0
- data/app/views/catarse_bootstrap/notifications_mailer/updates.en.html.slim +4 -0
- data/app/views/catarse_bootstrap/notifications_mailer/updates.pt.html.slim +4 -0
- data/app/views/channels/adm/projects/index.html.slim +121 -0
- data/app/views/channels/adm/statistics/index.html.slim +21 -0
- data/app/views/channels/base/index.html.slim +2 -0
- data/app/views/channels/profiles/_footer.html.slim +13 -0
- data/app/views/channels/profiles/how_it_works.html.slim +67 -0
- data/app/views/channels/profiles/show.html.slim +47 -0
- data/app/views/channels/projects/_banner.html.slim +8 -0
- data/app/views/channels/projects/_project.html.slim +12 -0
- data/app/views/channels/projects/new.html.slim +128 -0
- data/app/views/credits_mailer/request_refund_from.text.erb +11 -0
- data/app/views/custom/.gitkeep +0 -0
- data/app/views/explore/index.html.slim +47 -0
- data/app/views/layouts/_analytics.html.slim +9 -0
- data/app/views/layouts/_announcement.html.slim +4 -0
- data/app/views/layouts/_catarse_bootstrap_notices.html.slim +4 -0
- data/app/views/layouts/_classic_uservoice.html.slim +31 -0
- data/app/views/layouts/_facebook_like.html.slim +2 -0
- data/app/views/layouts/_facebook_sdk.html.slim +20 -0
- data/app/views/layouts/_flash.html.slim +6 -0
- data/app/views/layouts/_header.html.slim +49 -0
- data/app/views/layouts/_locales.html.slim +7 -0
- data/app/views/layouts/_new_uservoice.html.slim +20 -0
- data/app/views/layouts/_twitter.html.erb +1 -0
- data/app/views/layouts/application.html.slim +71 -0
- data/app/views/layouts/channel_email.html.slim +23 -0
- data/app/views/layouts/email.html.slim +26 -0
- data/app/views/layouts/embed.html.slim +13 -0
- data/app/views/notifications_mailer/adm_project_deadline.en.html.slim +3 -0
- data/app/views/notifications_mailer/adm_project_deadline.pt.html.slim +3 -0
- data/app/views/notifications_mailer/backer_canceled_after_confirmed.html.slim +12 -0
- data/app/views/notifications_mailer/backer_confirmed_after_project_was_closed.en.html.slim +8 -0
- data/app/views/notifications_mailer/backer_confirmed_after_project_was_closed.pt.html.slim +8 -0
- data/app/views/notifications_mailer/backer_project_successful.en.html.slim +48 -0
- data/app/views/notifications_mailer/backer_project_successful.pt.html.slim +50 -0
- data/app/views/notifications_mailer/backer_project_unsuccessful.en.html.slim +39 -0
- data/app/views/notifications_mailer/backer_project_unsuccessful.pt.html.slim +41 -0
- data/app/views/notifications_mailer/confirm_backer.en.html.slim +43 -0
- data/app/views/notifications_mailer/confirm_backer.pt.html.slim +45 -0
- data/app/views/notifications_mailer/credits_warning.en.html.slim +41 -0
- data/app/views/notifications_mailer/credits_warning.pt.html.slim +40 -0
- data/app/views/notifications_mailer/new_draft_project.en.html.slim +34 -0
- data/app/views/notifications_mailer/new_draft_project.pt.html.slim +34 -0
- data/app/views/notifications_mailer/new_draft_project_channel.en.html.slim +34 -0
- data/app/views/notifications_mailer/new_draft_project_channel.pt.html.slim +34 -0
- data/app/views/notifications_mailer/new_features.en.html.slim +30 -0
- data/app/views/notifications_mailer/new_features.pt.html.slim +30 -0
- data/app/views/notifications_mailer/payment_slip.en.html.slim +19 -0
- data/app/views/notifications_mailer/payment_slip.pt.html.slim +24 -0
- data/app/views/notifications_mailer/pending_backer_project_unsuccessful.en.html.slim +44 -0
- data/app/views/notifications_mailer/pending_backer_project_unsuccessful.pt.html.slim +44 -0
- data/app/views/notifications_mailer/processing_payment.en.html.slim +24 -0
- data/app/views/notifications_mailer/processing_payment.pt.html.slim +29 -0
- data/app/views/notifications_mailer/project_in_wainting_funds.en.html.slim +35 -0
- data/app/views/notifications_mailer/project_in_wainting_funds.pt.html.slim +35 -0
- data/app/views/notifications_mailer/project_owner_backer_confirmed.en.html.slim +33 -0
- data/app/views/notifications_mailer/project_owner_backer_confirmed.pt.html.slim +34 -0
- data/app/views/notifications_mailer/project_received.en.html.slim +38 -0
- data/app/views/notifications_mailer/project_received.pt.html.slim +50 -0
- data/app/views/notifications_mailer/project_received_channel.en.html.slim +52 -0
- data/app/views/notifications_mailer/project_received_channel.pt.html.slim +52 -0
- data/app/views/notifications_mailer/project_rejected.en.html.slim +33 -0
- data/app/views/notifications_mailer/project_rejected.pt.html.slim +33 -0
- data/app/views/notifications_mailer/project_success.en.html.slim +30 -0
- data/app/views/notifications_mailer/project_success.pt.html.slim +30 -0
- data/app/views/notifications_mailer/project_unsuccessful.en.html.slim +42 -0
- data/app/views/notifications_mailer/project_unsuccessful.pt.html.slim +42 -0
- data/app/views/notifications_mailer/project_visible.en.html.slim +65 -0
- data/app/views/notifications_mailer/project_visible.pt.html.slim +65 -0
- data/app/views/projects/_admin_fields.html.slim +15 -0
- data/app/views/projects/_draft_warning.html.slim +23 -0
- data/app/views/projects/_failed_warning.html.slim +21 -0
- data/app/views/projects/_formatting_tips.en.html.slim +19 -0
- data/app/views/projects/_formatting_tips.pt.html.slim +20 -0
- data/app/views/projects/_online_warning.html.slim +33 -0
- data/app/views/projects/_project.html.slim +23 -0
- data/app/views/projects/_project_about.html.slim +20 -0
- data/app/views/projects/_project_edit.html.slim +32 -0
- data/app/views/projects/_project_header.html.slim +34 -0
- data/app/views/projects/_project_reports.html.slim +22 -0
- data/app/views/projects/_project_templates.html.slim +3 -0
- data/app/views/projects/_recommended_header.html.slim +19 -0
- data/app/views/projects/_rejected_warning.html.slim +10 -0
- data/app/views/projects/_successful_warning.html.slim +29 -0
- data/app/views/projects/_twitter_timeline.html.slim +2 -0
- data/app/views/projects/_waiting_funds_warning.html.slim +34 -0
- data/app/views/projects/backers/_anonymous_warning.en.html.slim +5 -0
- data/app/views/projects/backers/_anonymous_warning.pt.html.slim +5 -0
- data/app/views/projects/backers/_back_text.en.html.slim +11 -0
- data/app/views/projects/backers/_back_text.pt.html.slim +11 -0
- data/app/views/projects/backers/_backer.html.slim +42 -0
- data/app/views/projects/backers/create.html.slim +75 -0
- data/app/views/projects/backers/new.html.slim +40 -0
- data/app/views/projects/backers/show.html.slim +26 -0
- data/app/views/projects/embed.html.slim +2 -0
- data/app/views/projects/embed_panel.html.slim +11 -0
- data/app/views/projects/index.html.slim +70 -0
- data/app/views/projects/new.html.slim +134 -0
- data/app/views/projects/show.html.slim +169 -0
- data/app/views/projects/start.html.slim +121 -0
- data/app/views/projects/updates/_update.html.slim +17 -0
- data/app/views/projects/updates/new.html.slim +22 -0
- data/app/views/projects/video_embed.html.slim +8 -0
- data/app/views/projects_mailer/start_project_email.html.slim +29 -0
- data/app/views/rewards/_form.html.slim +19 -0
- data/app/views/rewards/edit.html.slim +1 -0
- data/app/views/rewards/index.html.slim +55 -0
- data/app/views/rewards/new.html.slim +1 -0
- data/app/views/static/_guidelines_text.pt.html.slim +17 -0
- data/app/views/static/_how_it_works.en.html.slim +11 -0
- data/app/views/static/_how_it_works.pt.html.slim +11 -0
- data/app/views/static/_more_tips.pt.html.slim +20 -0
- data/app/views/static/about.html.slim +79 -0
- data/app/views/static/guidelines.html.slim +22 -0
- data/app/views/static/guidelines_backers.html.slim +94 -0
- data/app/views/static/guidelines_start.html.slim +90 -0
- data/app/views/static/guidelines_tips.html.slim +68 -0
- data/app/views/static/sitemap.builder +61 -0
- data/app/views/users/_credits.html.slim +44 -0
- data/app/views/users/_current_user_fields.html.slim +76 -0
- data/app/views/users/_project.html.slim +60 -0
- data/app/views/users/_unsubscribes.html.slim +23 -0
- data/app/views/users/backers/index.html.slim +2 -0
- data/app/views/users/projects/index.html.slim +3 -0
- data/app/views/users/set_email.html.slim +16 -0
- data/app/views/users/show.html.slim +72 -0
- data/app/views/users/uservoice_gadget.html.slim +45 -0
- data/app/workers/notify_update_worker.rb +9 -0
- data/config/boot.rb +13 -0
- data/config/compass.rb +5 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +46 -0
- data/config/environments/production.rb +70 -0
- data/config/environments/test.rb +44 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/capybara.rb +5 -0
- data/config/initializers/carrierwave.rb +13 -0
- data/config/initializers/default_url_options.rb +6 -0
- data/config/initializers/devise.rb +252 -0
- data/config/initializers/formtastic.rb +9 -0
- data/config/initializers/google_analytics.rb +3 -0
- data/config/initializers/http_accept_language.rb +7 -0
- data/config/initializers/inflections.rb +13 -0
- data/config/initializers/locale.rb +9 -0
- data/config/initializers/mailchimp.rb +1 -0
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/pluralize.rb +5 -0
- data/config/initializers/schema_associations.rb +3 -0
- data/config/initializers/secret_token.rb +16 -0
- data/config/initializers/sendgrid.rb +15 -0
- data/config/initializers/session_store.rb +15 -0
- data/config/initializers/statistics_loader_development.rb +4 -0
- data/config/initializers/timeout.rb +1 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/locales/.wti.sample +14 -0
- data/config/locales/adm.en.yml +107 -0
- data/config/locales/adm.pt.yml +150 -0
- data/config/locales/catarse_bootstrap/models/user.en.yml +13 -0
- data/config/locales/catarse_bootstrap/models/user.pt.yml +13 -0
- data/config/locales/catarse_bootstrap/pages/forgot_password.en.yml +14 -0
- data/config/locales/catarse_bootstrap/pages/forgot_password.pt.yml +14 -0
- data/config/locales/catarse_bootstrap/pages/login.en.yml +16 -0
- data/config/locales/catarse_bootstrap/pages/login.pt.yml +16 -0
- data/config/locales/catarse_bootstrap/pages/reset_password.en.yml +14 -0
- data/config/locales/catarse_bootstrap/pages/reset_password.pt.yml +14 -0
- data/config/locales/catarse_bootstrap/pages/sign_up.en.yml +18 -0
- data/config/locales/catarse_bootstrap/pages/sign_up.pt.yml +17 -0
- data/config/locales/channels.pt.yml +100 -0
- data/config/locales/devise.en.yml +99 -0
- data/config/locales/devise.pt.yml +98 -0
- data/config/locales/en.yml +872 -0
- data/config/locales/notifications.en.yml +74 -0
- data/config/locales/notifications.pt.yml +74 -0
- data/config/locales/pt.yml +896 -0
- data/config/locales/rails.en.yml +209 -0
- data/config/locales/rails.pt.yml +211 -0
- data/config/locales/will_paginate.en.yml +5 -0
- data/config/locales/will_paginate.pt.yml +5 -0
- data/config/newrelic.yml +227 -0
- data/config/routes.rb +150 -0
- data/config/sidekiq.yml +1 -0
- data/config/unicorn.rb +38 -0
- data/db/migrate/20121226120921_initial_schema.rb +1836 -0
- data/db/migrate/20121227012003_user_totals_back_to_state_machine.rb +53 -0
- data/db/migrate/20121227012324_statistics_back_to_state_machine.rb +47 -0
- data/db/migrate/20121230111351_add_online_date_to_projects.rb +5 -0
- data/db/migrate/20130102180139_update_projects_to_state_machine_again.rb +25 -0
- data/db/migrate/20130104005632_add_moip_login_to_users.rb +5 -0
- data/db/migrate/20130104104501_add_how_know_and_more_links_to_projects.rb +6 -0
- data/db/migrate/20130105123546_add_first_backers_to_projects.rb +5 -0
- data/db/migrate/20130110191750_add_uploaded_image_to_projects.rb +5 -0
- data/db/migrate/20130117205659_alter_projects_drop_video_url_constraint.rb +15 -0
- data/db/migrate/20130118193907_fix_statistics_view.rb +45 -0
- data/db/migrate/20130121162447_create_backer_reports.rb +41 -0
- data/db/migrate/20130121204224_fix_projects_states.rb +11 -0
- data/db/migrate/20130121212325_fix_statistcs_again.rb +45 -0
- data/db/migrate/20130131121553_add_cpf_to_backer_report.rb +75 -0
- data/db/migrate/20130201200604_remove_curated_pages.rb +9 -0
- data/db/migrate/20130201202648_remove_projects_managers.rb +9 -0
- data/db/migrate/20130201202829_remove_active_admin_comments.rb +9 -0
- data/db/migrate/20130201205659_remove_institutional_videos.rb +9 -0
- data/db/migrate/20130204192704_create_backer_reports_for_project_owner.rb +33 -0
- data/db/migrate/20130205143533_remove_credits_from_users.rb +9 -0
- data/db/migrate/20130206121758_fix_view_backer_reports_for_project_owner.rb +34 -0
- data/db/migrate/20130211174609_add_name_en_to_categories.rb +5 -0
- data/db/migrate/20130212145115_rename_name_to_name_pt.rb +5 -0
- data/db/migrate/20130213184141_change_permalink_to_not_null.rb +17 -0
- data/db/migrate/20130218201312_create_users_oauth_providers.rb +10 -0
- data/db/migrate/20130218201751_migrate_user_data_to_users_oath_providers.rb +12 -0
- data/db/migrate/20130221171018_rename_users_oath_providers.rb +21 -0
- data/db/migrate/20130221172840_populate_authorizations.rb +12 -0
- data/db/migrate/20130221175717_remove_static_contents.rb +13 -0
- data/db/migrate/20130221184144_update_oauth_provider_name_to_lower.rb +8 -0
- data/db/migrate/20130221185532_recreate_statistics_with_new_users.rb +62 -0
- data/db/migrate/20130221201732_remove_secondary_users.rb +82 -0
- data/db/migrate/20130222163633_add_state_inscription_to_user.rb +5 -0
- data/db/migrate/20130225135512_update_user_emails_from_backers.rb +15 -0
- data/db/migrate/20130225141802_alter_user_drop_provider_uid_constraints.rb +15 -0
- data/db/migrate/20130228141234_add_unique_index_to_configuration.rb +5 -0
- data/db/migrate/20130304193806_create_channel_profiles.rb +12 -0
- data/db/migrate/20130307074614_create_versions.rb +24 -0
- data/db/migrate/20130307090153_add_reindex_versions_to_rewards.rb +5 -0
- data/db/migrate/20130308200907_add_user_name_on_backer_report_for_project_owner.rb +62 -0
- data/db/migrate/20130311191444_drop_uid_and_provider_constraint_on_users.rb +13 -0
- data/db/migrate/20130311192846_remove_unnecessary_user_indexes.rb +14 -0
- data/db/migrate/20130312001021_fix_duplicate_emails.rb +26 -0
- data/db/migrate/20130313032607_rename_channels_profiles_to_channels.rb +9 -0
- data/db/migrate/20130313034356_create_channels_projects.rb +8 -0
- data/db/migrate/20130319131919_create_channels_trustees.rb +12 -0
- data/db/migrate/20130410181958_add_twitter_and_facebook_and_email_to_channels.rb +7 -0
- data/db/migrate/20130410190247_add_image_to_channels.rb +5 -0
- data/db/migrate/20130410191240_add_website_to_channels.rb +5 -0
- data/db/migrate/20130411193016_create_channels_subscribers.rb +13 -0
- data/db/migrate/20130419184530_add_state_to_backers.rb +5 -0
- data/db/migrate/20130422071805_add_notification_type_draft_channel.rb +13 -0
- data/db/migrate/20130422072051_add_notification_type_project_received_channel.rb +13 -0
- data/db/migrate/20130423162359_update_user_total_to_backer_state_machine.rb +59 -0
- data/db/migrate/20130424173128_add_backer_state_machine_into_statistics.rb +61 -0
- data/db/migrate/20130426204503_add_row_order_to_rewards.rb +7 -0
- data/db/migrate/20130429142823_rename_categories.rb +12 -0
- data/db/migrate/20130429144749_add_new_categories.rb +27 -0
- data/db/migrate/20130429153115_move_projects_to_art_and_remove_old_categories.rb +15 -0
- data/db/migrate/20130430203333_add_layout_to_notification_type.rb +5 -0
- data/db/migrate/20130502175814_add_anonymous_to_reports_to_project_owner.rb +37 -0
- data/db/migrate/20130505013655_update_backers_state_machine.rb +35 -0
- data/db/migrate/20130506191243_update_backer_reports_to_project_owner_view_to_backer_state_machine.rb +65 -0
- data/db/migrate/20130506191508_update_backer_reports_to_backer_state_machine.rb +74 -0
- data/db/migrate/20130514132519_add_waiting_confirmation_on_statistics_view.rb +63 -0
- data/db/migrate/20130514185010_drop_views.rb +35 -0
- data/db/migrate/20130514185116_fix_project_owner_view.rb +66 -0
- data/db/migrate/20130514185926_remove_boolean_fields_from_projects.rb +18 -0
- data/db/migrate/20130515192404_remove_boolean_fields_from_backers.rb +14 -0
- data/db/migrate/20130523144013_fix_project_total_to_use_refunded_and_requested_refund_too.rb +15 -0
- data/db/migrate/20130523173609_fix_project_total_again_some_regex_error.rb +15 -0
- data/db/migrate/20130527204639_add_video_embed_url_to_projects.rb +5 -0
- data/db/migrate/20130529171845_update_backers_that_are_in_refunded_when_project_is_online.rb +17 -0
- data/db/migrate/20130604171730_add_index_to_payment_notification_on_backer_id.rb +5 -0
- data/db/migrate/20130604172253_update_online_date_for_legacy_projects.rb +10 -0
- data/db/migrate/20130604175953_remove_expires_at_from_views.rb +11 -0
- data/db/migrate/20130604180503_remove_expires_at_from_projects.rb +11 -0
- data/db/migrate/20130607222330_remove_image_url_from_projects.rb +9 -0
- data/db/migrate/20130617175402_create_projects_chart_view.rb +51 -0
- data/db/migrate/20130618175432_create_backers_by_period_view.rb +57 -0
- data/db/migrate/20130626122439_add_expires_at_function.rb +12 -0
- data/db/migrate/20130626124055_drop_payment_logs.rb +8 -0
- data/db/migrate/20130702192659_update_backers_by_period_view_with_deleted_backer_state.rb +107 -0
- data/db/migrate/20130703171547_add_exclusive_to_updates.rb +5 -0
- data/db/migrate/20130705131825_replace_expires_at_to_include_timezone.rb +18 -0
- data/db/migrate/20130705184845_alter_statistics_view_add_deleted_backer_state.rb +61 -0
- data/db/migrate/20130710122804_add_days_to_delivery_into_rewards.rb +5 -0
- data/db/migrate/20130722222945_remove_legacy_columns_from_users.rb +10 -0
- data/db/migrate/20130730232043_add_total_payments_service_fee_into_project_totals.rb +27 -0
- data/db/migrate/20130805230126_add_total_backed_projects_to_user_total.rb +60 -0
- data/db/migrate/20130812191450_show_refunded_on_backers_report.rb +74 -0
- data/db/migrate/20130814174329_alter_timestamp_to_include_timezone.rb +17 -0
- data/db/migrate/20130815161926_create_recommendations_view.rb +64 -0
- data/db/migrate/20130818015857_add_projects_home_view.rb +37 -0
- data/db/migrate/20130822215532_fix_credits_into_user_totals_view.rb +67 -0
- data/db/migrate/20130827210414_revert_expires_at.rb +12 -0
- data/db/migrate/20130828160026_use_expires_at_in_view.rb +11 -0
- data/db/migrate/20130829180232_use_timezone_instead_of_hardcoded_3.rb +12 -0
- data/db/migrate/20130905153553_add_sessions_table.rb +12 -0
- data/db/migrate/20130911180657_create_subscriber_reports.rb +8 -0
- data/db/seeds.rb +122 -0
- data/db/seeds/add-users.rb +40 -0
- data/db/seeds/my-seeds-local.example.rb +85 -0
- data/lib/blog.rb +14 -0
- data/lib/calendar.rb +19 -0
- data/lib/catarse_auto_html.rb +23 -0
- data/lib/catarse_full.rb +4 -0
- data/lib/catarse_full/engine.rb +77 -0
- data/lib/catarse_full/version.rb +3 -0
- data/lib/payment_engines.rb +26 -0
- data/lib/tasks/.gitkeep +0 -0
- data/lib/tasks/catarse_full_tasks.rake +4 -0
- data/lib/tasks/config.rake +56 -0
- data/lib/tasks/cron.rake +76 -0
- data/lib/tasks/db_seed.rake +15 -0
- data/lib/tasks/jasmine.rake +8 -0
- data/lib/tasks/send_old_posts_to_tumblr.rake +14 -0
- data/lib/tasks/users.rake +82 -0
- data/lib/uservoice_sso.rb +20 -0
- data/spec/abilities/trustee_ability_spec.rb +53 -0
- data/spec/config/initializers/secret_token_spec.rb +19 -0
- data/spec/controllers/adm/backers_controller_spec.rb +119 -0
- data/spec/controllers/adm/statistics_controller.rb +17 -0
- data/spec/controllers/adm/users_controller_spec.rb +29 -0
- data/spec/controllers/channels/adm/reports/subscriber_reports_controller_spec.rb +24 -0
- data/spec/controllers/channels/base_controller_spec.rb +5 -0
- data/spec/controllers/channels/channels_subscribers_controller_spec.rb +59 -0
- data/spec/controllers/channels/profiles_controller_spec.rb +16 -0
- data/spec/controllers/omniauth_callbacks_controller_spec.rb +113 -0
- data/spec/controllers/projects/backers_controller_spec.rb +198 -0
- data/spec/controllers/projects/updates_controller_spec.rb +57 -0
- data/spec/controllers/projects_controller_spec.rb +178 -0
- data/spec/controllers/rewards_controller_spec.rb +107 -0
- data/spec/controllers/static_controller_spec.rb +37 -0
- data/spec/controllers/unsubscribes_controller_spec.rb +31 -0
- data/spec/controllers/users/backers_controller_spec.rb +86 -0
- data/spec/controllers/users/projects_controller_spec.rb +19 -0
- data/spec/controllers/users_controller_spec.rb +92 -0
- data/spec/decorators/project_decorator_spec.rb +146 -0
- data/spec/decorators/user_decorator_spec.rb +87 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +69 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.sample.yml +50 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/devise_secret_key.rb +3 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/dummy/db/structure.sql +2434 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/factories.rb +125 -0
- data/spec/factories/users_oauth_providers.rb +9 -0
- data/spec/features/channel_moderation_spec.rb +27 -0
- data/spec/features/projects_spec.rb +95 -0
- data/spec/features/users_spec.rb +43 -0
- data/spec/fixtures/image.png +0 -0
- data/spec/helpers/channels/base_helper_spec.rb +15 -0
- data/spec/javascripts/app_spec.js +85 -0
- data/spec/javascripts/backer_spec.js +74 -0
- data/spec/javascripts/explore_spec.js +211 -0
- data/spec/javascripts/feedback_support_spec.js +41 -0
- data/spec/javascripts/helpers/.gitkeep +0 -0
- data/spec/javascripts/mix_panel_spec.js +101 -0
- data/spec/javascripts/permalink_spec.js +50 -0
- data/spec/javascripts/project_comments_spec.js +66 -0
- data/spec/javascripts/project_sidebar_spec.js +105 -0
- data/spec/javascripts/project_spec.js +175 -0
- data/spec/javascripts/registration_spec.js +38 -0
- data/spec/javascripts/review_form_spec.js +140 -0
- data/spec/javascripts/skull_spec.js +103 -0
- data/spec/javascripts/support/jasmine.yml +93 -0
- data/spec/javascripts/timed_input_spec.js +64 -0
- data/spec/javascripts/updates_spec.js +49 -0
- data/spec/javascripts/video_url_spec.js +42 -0
- data/spec/lib/blog_spec.rb +12 -0
- data/spec/lib/payment_engines_spec.rb +61 -0
- data/spec/mailers/notifications_mailer_spec.rb +20 -0
- data/spec/models/ability_spec.rb +123 -0
- data/spec/models/authorizations_spec.rb +6 -0
- data/spec/models/backer_report_spec.rb +5 -0
- data/spec/models/backer_spec.rb +459 -0
- data/spec/models/category_spec.rb +13 -0
- data/spec/models/channel_spec.rb +47 -0
- data/spec/models/channels_subscriber_spec.rb +13 -0
- data/spec/models/configuration_spec.rb +31 -0
- data/spec/models/notification_spec.rb +105 -0
- data/spec/models/oauth_provider_spec.rb +7 -0
- data/spec/models/payment_notification_spec.rb +17 -0
- data/spec/models/project_spec.rb +771 -0
- data/spec/models/project_total_spec.rb +26 -0
- data/spec/models/projects_for_home_spec.rb +44 -0
- data/spec/models/reward_spec.rb +141 -0
- data/spec/models/statistics_spec.rb +46 -0
- data/spec/models/subscriber_report_spec.rb +42 -0
- data/spec/models/unsubscribe_spec.rb +27 -0
- data/spec/models/update_spec.rb +95 -0
- data/spec/models/user_spec.rb +357 -0
- data/spec/models/user_total_spec.rb +5 -0
- data/spec/observers/backer_observer_spec.rb +119 -0
- data/spec/observers/notification_observer_spec.rb +13 -0
- data/spec/observers/payment_notification_observer_spec.rb +34 -0
- data/spec/observers/project_observer_spec.rb +224 -0
- data/spec/observers/update_observer_spec.rb +17 -0
- data/spec/observers/user_observer_spec.rb +23 -0
- data/spec/spec_helper.rb +82 -0
- data/spec/support/devise.rb +3 -0
- data/spec/support/factory_girl.rb +2 -0
- data/spec/support/feature_helpers.rb +19 -0
- data/spec/uploaders/image_uploader_spec.rb +58 -0
- data/spec/uploaders/project_uploader_spec.rb +37 -0
- data/spec/uploaders/user_uploader_spec.rb +23 -0
- data/spec/views/channels/base/index.html.slim_spec.rb +5 -0
- metadata +1915 -0
@@ -0,0 +1,2434 @@
|
|
1
|
+
--
|
2
|
+
-- PostgreSQL database dump
|
3
|
+
--
|
4
|
+
|
5
|
+
SET statement_timeout = 0;
|
6
|
+
SET lock_timeout = 0;
|
7
|
+
SET client_encoding = 'UTF8';
|
8
|
+
SET standard_conforming_strings = on;
|
9
|
+
SET check_function_bodies = false;
|
10
|
+
SET client_min_messages = warning;
|
11
|
+
|
12
|
+
--
|
13
|
+
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
|
14
|
+
--
|
15
|
+
|
16
|
+
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
|
17
|
+
|
18
|
+
|
19
|
+
--
|
20
|
+
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
|
21
|
+
--
|
22
|
+
|
23
|
+
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
|
24
|
+
|
25
|
+
|
26
|
+
--
|
27
|
+
-- Name: pg_trgm; Type: EXTENSION; Schema: -; Owner: -
|
28
|
+
--
|
29
|
+
|
30
|
+
CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;
|
31
|
+
|
32
|
+
|
33
|
+
--
|
34
|
+
-- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: -
|
35
|
+
--
|
36
|
+
|
37
|
+
COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';
|
38
|
+
|
39
|
+
|
40
|
+
--
|
41
|
+
-- Name: unaccent; Type: EXTENSION; Schema: -; Owner: -
|
42
|
+
--
|
43
|
+
|
44
|
+
CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public;
|
45
|
+
|
46
|
+
|
47
|
+
--
|
48
|
+
-- Name: EXTENSION unaccent; Type: COMMENT; Schema: -; Owner: -
|
49
|
+
--
|
50
|
+
|
51
|
+
COMMENT ON EXTENSION unaccent IS 'text search dictionary that removes accents';
|
52
|
+
|
53
|
+
|
54
|
+
SET search_path = public, pg_catalog;
|
55
|
+
|
56
|
+
SET default_tablespace = '';
|
57
|
+
|
58
|
+
SET default_with_oids = false;
|
59
|
+
|
60
|
+
--
|
61
|
+
-- Name: projects; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
62
|
+
--
|
63
|
+
|
64
|
+
CREATE TABLE projects (
|
65
|
+
id integer NOT NULL,
|
66
|
+
name text NOT NULL,
|
67
|
+
user_id integer NOT NULL,
|
68
|
+
category_id integer NOT NULL,
|
69
|
+
goal numeric NOT NULL,
|
70
|
+
about text NOT NULL,
|
71
|
+
headline text NOT NULL,
|
72
|
+
video_url text,
|
73
|
+
short_url text,
|
74
|
+
created_at timestamp without time zone,
|
75
|
+
updated_at timestamp without time zone,
|
76
|
+
about_html text,
|
77
|
+
recommended boolean DEFAULT false,
|
78
|
+
home_page_comment text,
|
79
|
+
permalink text NOT NULL,
|
80
|
+
video_thumbnail text,
|
81
|
+
state character varying(255),
|
82
|
+
online_days integer DEFAULT 0,
|
83
|
+
online_date timestamp with time zone,
|
84
|
+
how_know text,
|
85
|
+
more_links text,
|
86
|
+
first_backers text,
|
87
|
+
uploaded_image character varying(255),
|
88
|
+
video_embed_url character varying(255),
|
89
|
+
CONSTRAINT projects_about_not_blank CHECK ((length(btrim(about)) > 0)),
|
90
|
+
CONSTRAINT projects_headline_length_within CHECK (((length(headline) >= 1) AND (length(headline) <= 140))),
|
91
|
+
CONSTRAINT projects_headline_not_blank CHECK ((length(btrim(headline)) > 0))
|
92
|
+
);
|
93
|
+
|
94
|
+
|
95
|
+
--
|
96
|
+
-- Name: expires_at(projects); Type: FUNCTION; Schema: public; Owner: -
|
97
|
+
--
|
98
|
+
|
99
|
+
CREATE FUNCTION expires_at(projects) RETURNS timestamp with time zone
|
100
|
+
LANGUAGE sql
|
101
|
+
AS $_$
|
102
|
+
SELECT ((((($1.online_date AT TIME ZONE coalesce((SELECT value FROM configurations WHERE name = 'timezone'), 'America/Sao_Paulo') + ($1.online_days || ' days')::interval) )::date::text || ' 23:59:59')::timestamp AT TIME ZONE coalesce((SELECT value FROM configurations WHERE name = 'timezone'), 'America/Sao_Paulo'))::timestamptz )
|
103
|
+
$_$;
|
104
|
+
|
105
|
+
|
106
|
+
--
|
107
|
+
-- Name: authorizations; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
108
|
+
--
|
109
|
+
|
110
|
+
CREATE TABLE authorizations (
|
111
|
+
id integer NOT NULL,
|
112
|
+
oauth_provider_id integer NOT NULL,
|
113
|
+
user_id integer NOT NULL,
|
114
|
+
uid text NOT NULL,
|
115
|
+
created_at timestamp without time zone NOT NULL,
|
116
|
+
updated_at timestamp without time zone NOT NULL
|
117
|
+
);
|
118
|
+
|
119
|
+
|
120
|
+
--
|
121
|
+
-- Name: authorizations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
122
|
+
--
|
123
|
+
|
124
|
+
CREATE SEQUENCE authorizations_id_seq
|
125
|
+
START WITH 1
|
126
|
+
INCREMENT BY 1
|
127
|
+
NO MINVALUE
|
128
|
+
NO MAXVALUE
|
129
|
+
CACHE 1;
|
130
|
+
|
131
|
+
|
132
|
+
--
|
133
|
+
-- Name: authorizations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
134
|
+
--
|
135
|
+
|
136
|
+
ALTER SEQUENCE authorizations_id_seq OWNED BY authorizations.id;
|
137
|
+
|
138
|
+
|
139
|
+
--
|
140
|
+
-- Name: backers; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
141
|
+
--
|
142
|
+
|
143
|
+
CREATE TABLE backers (
|
144
|
+
id integer NOT NULL,
|
145
|
+
project_id integer NOT NULL,
|
146
|
+
user_id integer NOT NULL,
|
147
|
+
reward_id integer,
|
148
|
+
value numeric NOT NULL,
|
149
|
+
confirmed_at timestamp without time zone,
|
150
|
+
created_at timestamp without time zone,
|
151
|
+
updated_at timestamp without time zone,
|
152
|
+
anonymous boolean DEFAULT false,
|
153
|
+
key text,
|
154
|
+
credits boolean DEFAULT false,
|
155
|
+
notified_finish boolean DEFAULT false,
|
156
|
+
payment_method text,
|
157
|
+
payment_token text,
|
158
|
+
payment_id character varying(255),
|
159
|
+
payer_name text,
|
160
|
+
payer_email text,
|
161
|
+
payer_document text,
|
162
|
+
address_street text,
|
163
|
+
address_number text,
|
164
|
+
address_complement text,
|
165
|
+
address_neighbourhood text,
|
166
|
+
address_zip_code text,
|
167
|
+
address_city text,
|
168
|
+
address_state text,
|
169
|
+
address_phone_number text,
|
170
|
+
payment_choice text,
|
171
|
+
payment_service_fee numeric,
|
172
|
+
state character varying(255),
|
173
|
+
CONSTRAINT backers_value_positive CHECK ((value >= (0)::numeric))
|
174
|
+
);
|
175
|
+
|
176
|
+
|
177
|
+
--
|
178
|
+
-- Name: rewards; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
179
|
+
--
|
180
|
+
|
181
|
+
CREATE TABLE rewards (
|
182
|
+
id integer NOT NULL,
|
183
|
+
project_id integer NOT NULL,
|
184
|
+
minimum_value numeric NOT NULL,
|
185
|
+
maximum_backers integer,
|
186
|
+
description text NOT NULL,
|
187
|
+
created_at timestamp without time zone,
|
188
|
+
updated_at timestamp without time zone,
|
189
|
+
reindex_versions timestamp without time zone,
|
190
|
+
row_order integer,
|
191
|
+
days_to_delivery integer,
|
192
|
+
CONSTRAINT rewards_maximum_backers_positive CHECK ((maximum_backers >= 0)),
|
193
|
+
CONSTRAINT rewards_minimum_value_positive CHECK ((minimum_value >= (0)::numeric))
|
194
|
+
);
|
195
|
+
|
196
|
+
|
197
|
+
--
|
198
|
+
-- Name: users; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
199
|
+
--
|
200
|
+
|
201
|
+
CREATE TABLE users (
|
202
|
+
id integer NOT NULL,
|
203
|
+
email text,
|
204
|
+
name text,
|
205
|
+
nickname text,
|
206
|
+
bio text,
|
207
|
+
image_url text,
|
208
|
+
newsletter boolean DEFAULT false,
|
209
|
+
project_updates boolean DEFAULT false,
|
210
|
+
created_at timestamp without time zone,
|
211
|
+
updated_at timestamp without time zone,
|
212
|
+
admin boolean DEFAULT false,
|
213
|
+
full_name text,
|
214
|
+
address_street text,
|
215
|
+
address_number text,
|
216
|
+
address_complement text,
|
217
|
+
address_neighbourhood text,
|
218
|
+
address_city text,
|
219
|
+
address_state text,
|
220
|
+
address_zip_code text,
|
221
|
+
phone_number text,
|
222
|
+
locale text DEFAULT 'pt'::text NOT NULL,
|
223
|
+
cpf text,
|
224
|
+
encrypted_password character varying(128) DEFAULT ''::character varying NOT NULL,
|
225
|
+
reset_password_token character varying(255),
|
226
|
+
reset_password_sent_at timestamp without time zone,
|
227
|
+
remember_created_at timestamp without time zone,
|
228
|
+
sign_in_count integer DEFAULT 0,
|
229
|
+
current_sign_in_at timestamp without time zone,
|
230
|
+
last_sign_in_at timestamp without time zone,
|
231
|
+
current_sign_in_ip character varying(255),
|
232
|
+
last_sign_in_ip character varying(255),
|
233
|
+
twitter character varying(255),
|
234
|
+
facebook_link character varying(255),
|
235
|
+
other_link character varying(255),
|
236
|
+
uploaded_image text,
|
237
|
+
moip_login character varying(255),
|
238
|
+
state_inscription character varying(255),
|
239
|
+
CONSTRAINT users_bio_length_within CHECK (((length(bio) >= 0) AND (length(bio) <= 140)))
|
240
|
+
);
|
241
|
+
|
242
|
+
|
243
|
+
--
|
244
|
+
-- Name: backer_reports; Type: VIEW; Schema: public; Owner: -
|
245
|
+
--
|
246
|
+
|
247
|
+
CREATE VIEW backer_reports AS
|
248
|
+
SELECT b.project_id,
|
249
|
+
u.name,
|
250
|
+
b.value,
|
251
|
+
r.minimum_value,
|
252
|
+
r.description,
|
253
|
+
b.payment_method,
|
254
|
+
b.payment_choice,
|
255
|
+
b.payment_service_fee,
|
256
|
+
b.key,
|
257
|
+
(b.created_at)::date AS created_at,
|
258
|
+
(b.confirmed_at)::date AS confirmed_at,
|
259
|
+
u.email,
|
260
|
+
b.payer_email,
|
261
|
+
b.payer_name,
|
262
|
+
COALESCE(b.payer_document, u.cpf) AS cpf,
|
263
|
+
u.address_street,
|
264
|
+
u.address_complement,
|
265
|
+
u.address_number,
|
266
|
+
u.address_neighbourhood,
|
267
|
+
u.address_city,
|
268
|
+
u.address_state,
|
269
|
+
u.address_zip_code,
|
270
|
+
b.state
|
271
|
+
FROM ((backers b
|
272
|
+
JOIN users u ON ((u.id = b.user_id)))
|
273
|
+
LEFT JOIN rewards r ON ((r.id = b.reward_id)))
|
274
|
+
WHERE ((b.state)::text = ANY ((ARRAY['confirmed'::character varying, 'refunded'::character varying, 'requested_refund'::character varying])::text[]));
|
275
|
+
|
276
|
+
|
277
|
+
--
|
278
|
+
-- Name: configurations; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
279
|
+
--
|
280
|
+
|
281
|
+
CREATE TABLE configurations (
|
282
|
+
id integer NOT NULL,
|
283
|
+
name text NOT NULL,
|
284
|
+
value text,
|
285
|
+
created_at timestamp without time zone,
|
286
|
+
updated_at timestamp without time zone,
|
287
|
+
CONSTRAINT configurations_name_not_blank CHECK ((length(btrim(name)) > 0))
|
288
|
+
);
|
289
|
+
|
290
|
+
|
291
|
+
--
|
292
|
+
-- Name: backer_reports_for_project_owners; Type: VIEW; Schema: public; Owner: -
|
293
|
+
--
|
294
|
+
|
295
|
+
CREATE VIEW backer_reports_for_project_owners AS
|
296
|
+
SELECT b.project_id,
|
297
|
+
COALESCE(r.id, 0) AS reward_id,
|
298
|
+
r.description AS reward_description,
|
299
|
+
(b.confirmed_at)::date AS confirmed_at,
|
300
|
+
b.value AS back_value,
|
301
|
+
(b.value * ( SELECT (configurations.value)::numeric AS value
|
302
|
+
FROM configurations
|
303
|
+
WHERE (configurations.name = 'catarse_fee'::text))) AS service_fee,
|
304
|
+
u.email AS user_email,
|
305
|
+
u.name AS user_name,
|
306
|
+
b.payer_email,
|
307
|
+
b.payment_method,
|
308
|
+
COALESCE(b.address_street, u.address_street) AS street,
|
309
|
+
COALESCE(b.address_complement, u.address_complement) AS complement,
|
310
|
+
COALESCE(b.address_number, u.address_number) AS address_number,
|
311
|
+
COALESCE(b.address_neighbourhood, u.address_neighbourhood) AS neighbourhood,
|
312
|
+
COALESCE(b.address_city, u.address_city) AS city,
|
313
|
+
COALESCE(b.address_state, u.address_state) AS state,
|
314
|
+
COALESCE(b.address_zip_code, u.address_zip_code) AS zip_code,
|
315
|
+
b.anonymous
|
316
|
+
FROM ((backers b
|
317
|
+
JOIN users u ON ((u.id = b.user_id)))
|
318
|
+
LEFT JOIN rewards r ON ((r.id = b.reward_id)))
|
319
|
+
WHERE ((b.state)::text = 'confirmed'::text);
|
320
|
+
|
321
|
+
|
322
|
+
--
|
323
|
+
-- Name: backers_by_periods; Type: VIEW; Schema: public; Owner: -
|
324
|
+
--
|
325
|
+
|
326
|
+
CREATE VIEW backers_by_periods AS
|
327
|
+
WITH weeks AS (
|
328
|
+
SELECT (generate_series.generate_series * 7) AS days
|
329
|
+
FROM generate_series(0, 7) generate_series(generate_series)
|
330
|
+
), current_period AS (
|
331
|
+
SELECT 'current_period'::text AS series,
|
332
|
+
sum(b.value) AS sum,
|
333
|
+
(w.days / 7) AS week
|
334
|
+
FROM (backers b
|
335
|
+
RIGHT JOIN weeks w ON ((((b.confirmed_at)::date >= ((('now'::text)::date - w.days) - 7)) AND (b.confirmed_at < (('now'::text)::date - w.days)))))
|
336
|
+
WHERE ((b.state)::text <> ALL ((ARRAY['pending'::character varying, 'canceled'::character varying, 'waiting_confirmation'::character varying, 'deleted'::character varying])::text[]))
|
337
|
+
GROUP BY (w.days / 7)
|
338
|
+
), previous_period AS (
|
339
|
+
SELECT 'previous_period'::text AS series,
|
340
|
+
sum(b.value) AS sum,
|
341
|
+
(w.days / 7) AS week
|
342
|
+
FROM (backers b
|
343
|
+
RIGHT JOIN weeks w ON ((((b.confirmed_at)::date >= (((('now'::text)::date - w.days) - 7) - 56)) AND (b.confirmed_at < ((('now'::text)::date - w.days) - 56)))))
|
344
|
+
WHERE ((b.state)::text <> ALL ((ARRAY['pending'::character varying, 'canceled'::character varying, 'waiting_confirmation'::character varying, 'deleted'::character varying])::text[]))
|
345
|
+
GROUP BY (w.days / 7)
|
346
|
+
), last_year AS (
|
347
|
+
SELECT 'last_year'::text AS series,
|
348
|
+
sum(b.value) AS sum,
|
349
|
+
(w.days / 7) AS week
|
350
|
+
FROM (backers b
|
351
|
+
RIGHT JOIN weeks w ON ((((b.confirmed_at)::date >= (((('now'::text)::date - w.days) - 7) - 365)) AND (b.confirmed_at < ((('now'::text)::date - w.days) - 365)))))
|
352
|
+
WHERE ((b.state)::text <> ALL ((ARRAY['pending'::character varying, 'canceled'::character varying, 'waiting_confirmation'::character varying, 'deleted'::character varying])::text[]))
|
353
|
+
GROUP BY (w.days / 7)
|
354
|
+
)
|
355
|
+
( SELECT current_period.series,
|
356
|
+
current_period.sum,
|
357
|
+
current_period.week
|
358
|
+
FROM current_period
|
359
|
+
UNION ALL
|
360
|
+
SELECT previous_period.series,
|
361
|
+
previous_period.sum,
|
362
|
+
previous_period.week
|
363
|
+
FROM previous_period)
|
364
|
+
UNION ALL
|
365
|
+
SELECT last_year.series,
|
366
|
+
last_year.sum,
|
367
|
+
last_year.week
|
368
|
+
FROM last_year
|
369
|
+
ORDER BY 1, 3;
|
370
|
+
|
371
|
+
|
372
|
+
--
|
373
|
+
-- Name: backers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
374
|
+
--
|
375
|
+
|
376
|
+
CREATE SEQUENCE backers_id_seq
|
377
|
+
START WITH 1
|
378
|
+
INCREMENT BY 1
|
379
|
+
NO MINVALUE
|
380
|
+
NO MAXVALUE
|
381
|
+
CACHE 1;
|
382
|
+
|
383
|
+
|
384
|
+
--
|
385
|
+
-- Name: backers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
386
|
+
--
|
387
|
+
|
388
|
+
ALTER SEQUENCE backers_id_seq OWNED BY backers.id;
|
389
|
+
|
390
|
+
|
391
|
+
--
|
392
|
+
-- Name: categories; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
393
|
+
--
|
394
|
+
|
395
|
+
CREATE TABLE categories (
|
396
|
+
id integer NOT NULL,
|
397
|
+
name_pt text NOT NULL,
|
398
|
+
created_at timestamp without time zone,
|
399
|
+
updated_at timestamp without time zone,
|
400
|
+
name_en character varying(255),
|
401
|
+
CONSTRAINT categories_name_not_blank CHECK ((length(btrim(name_pt)) > 0))
|
402
|
+
);
|
403
|
+
|
404
|
+
|
405
|
+
--
|
406
|
+
-- Name: categories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
407
|
+
--
|
408
|
+
|
409
|
+
CREATE SEQUENCE categories_id_seq
|
410
|
+
START WITH 1
|
411
|
+
INCREMENT BY 1
|
412
|
+
NO MINVALUE
|
413
|
+
NO MAXVALUE
|
414
|
+
CACHE 1;
|
415
|
+
|
416
|
+
|
417
|
+
--
|
418
|
+
-- Name: categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
419
|
+
--
|
420
|
+
|
421
|
+
ALTER SEQUENCE categories_id_seq OWNED BY categories.id;
|
422
|
+
|
423
|
+
|
424
|
+
--
|
425
|
+
-- Name: channels; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
426
|
+
--
|
427
|
+
|
428
|
+
CREATE TABLE channels (
|
429
|
+
id integer NOT NULL,
|
430
|
+
name character varying(255) NOT NULL,
|
431
|
+
description character varying(255),
|
432
|
+
permalink character varying(255),
|
433
|
+
created_at timestamp without time zone NOT NULL,
|
434
|
+
updated_at timestamp without time zone NOT NULL,
|
435
|
+
twitter character varying(255),
|
436
|
+
facebook character varying(255),
|
437
|
+
email character varying(255),
|
438
|
+
image character varying(255),
|
439
|
+
website character varying(255)
|
440
|
+
);
|
441
|
+
|
442
|
+
|
443
|
+
--
|
444
|
+
-- Name: channels_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
445
|
+
--
|
446
|
+
|
447
|
+
CREATE SEQUENCE channels_id_seq
|
448
|
+
START WITH 1
|
449
|
+
INCREMENT BY 1
|
450
|
+
NO MINVALUE
|
451
|
+
NO MAXVALUE
|
452
|
+
CACHE 1;
|
453
|
+
|
454
|
+
|
455
|
+
--
|
456
|
+
-- Name: channels_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
457
|
+
--
|
458
|
+
|
459
|
+
ALTER SEQUENCE channels_id_seq OWNED BY channels.id;
|
460
|
+
|
461
|
+
|
462
|
+
--
|
463
|
+
-- Name: channels_projects; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
464
|
+
--
|
465
|
+
|
466
|
+
CREATE TABLE channels_projects (
|
467
|
+
id integer NOT NULL,
|
468
|
+
channel_id integer,
|
469
|
+
project_id integer
|
470
|
+
);
|
471
|
+
|
472
|
+
|
473
|
+
--
|
474
|
+
-- Name: channels_projects_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
475
|
+
--
|
476
|
+
|
477
|
+
CREATE SEQUENCE channels_projects_id_seq
|
478
|
+
START WITH 1
|
479
|
+
INCREMENT BY 1
|
480
|
+
NO MINVALUE
|
481
|
+
NO MAXVALUE
|
482
|
+
CACHE 1;
|
483
|
+
|
484
|
+
|
485
|
+
--
|
486
|
+
-- Name: channels_projects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
487
|
+
--
|
488
|
+
|
489
|
+
ALTER SEQUENCE channels_projects_id_seq OWNED BY channels_projects.id;
|
490
|
+
|
491
|
+
|
492
|
+
--
|
493
|
+
-- Name: channels_subscribers; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
494
|
+
--
|
495
|
+
|
496
|
+
CREATE TABLE channels_subscribers (
|
497
|
+
id integer NOT NULL,
|
498
|
+
user_id integer NOT NULL,
|
499
|
+
channel_id integer NOT NULL
|
500
|
+
);
|
501
|
+
|
502
|
+
|
503
|
+
--
|
504
|
+
-- Name: channels_subscribers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
505
|
+
--
|
506
|
+
|
507
|
+
CREATE SEQUENCE channels_subscribers_id_seq
|
508
|
+
START WITH 1
|
509
|
+
INCREMENT BY 1
|
510
|
+
NO MINVALUE
|
511
|
+
NO MAXVALUE
|
512
|
+
CACHE 1;
|
513
|
+
|
514
|
+
|
515
|
+
--
|
516
|
+
-- Name: channels_subscribers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
517
|
+
--
|
518
|
+
|
519
|
+
ALTER SEQUENCE channels_subscribers_id_seq OWNED BY channels_subscribers.id;
|
520
|
+
|
521
|
+
|
522
|
+
--
|
523
|
+
-- Name: channels_trustees; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
524
|
+
--
|
525
|
+
|
526
|
+
CREATE TABLE channels_trustees (
|
527
|
+
id integer NOT NULL,
|
528
|
+
user_id integer,
|
529
|
+
channel_id integer
|
530
|
+
);
|
531
|
+
|
532
|
+
|
533
|
+
--
|
534
|
+
-- Name: channels_trustees_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
535
|
+
--
|
536
|
+
|
537
|
+
CREATE SEQUENCE channels_trustees_id_seq
|
538
|
+
START WITH 1
|
539
|
+
INCREMENT BY 1
|
540
|
+
NO MINVALUE
|
541
|
+
NO MAXVALUE
|
542
|
+
CACHE 1;
|
543
|
+
|
544
|
+
|
545
|
+
--
|
546
|
+
-- Name: channels_trustees_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
547
|
+
--
|
548
|
+
|
549
|
+
ALTER SEQUENCE channels_trustees_id_seq OWNED BY channels_trustees.id;
|
550
|
+
|
551
|
+
|
552
|
+
--
|
553
|
+
-- Name: configurations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
554
|
+
--
|
555
|
+
|
556
|
+
CREATE SEQUENCE configurations_id_seq
|
557
|
+
START WITH 1
|
558
|
+
INCREMENT BY 1
|
559
|
+
NO MINVALUE
|
560
|
+
NO MAXVALUE
|
561
|
+
CACHE 1;
|
562
|
+
|
563
|
+
|
564
|
+
--
|
565
|
+
-- Name: configurations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
566
|
+
--
|
567
|
+
|
568
|
+
ALTER SEQUENCE configurations_id_seq OWNED BY configurations.id;
|
569
|
+
|
570
|
+
|
571
|
+
--
|
572
|
+
-- Name: financial_reports; Type: VIEW; Schema: public; Owner: -
|
573
|
+
--
|
574
|
+
|
575
|
+
CREATE VIEW financial_reports AS
|
576
|
+
SELECT p.name,
|
577
|
+
u.moip_login,
|
578
|
+
p.goal,
|
579
|
+
expires_at(p.*) AS expires_at,
|
580
|
+
p.state
|
581
|
+
FROM (projects p
|
582
|
+
JOIN users u ON ((u.id = p.user_id)));
|
583
|
+
|
584
|
+
|
585
|
+
--
|
586
|
+
-- Name: notification_types; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
587
|
+
--
|
588
|
+
|
589
|
+
CREATE TABLE notification_types (
|
590
|
+
id integer NOT NULL,
|
591
|
+
name text NOT NULL,
|
592
|
+
created_at timestamp without time zone NOT NULL,
|
593
|
+
updated_at timestamp without time zone NOT NULL,
|
594
|
+
layout text DEFAULT 'email'::text NOT NULL
|
595
|
+
);
|
596
|
+
|
597
|
+
|
598
|
+
--
|
599
|
+
-- Name: notification_types_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
600
|
+
--
|
601
|
+
|
602
|
+
CREATE SEQUENCE notification_types_id_seq
|
603
|
+
START WITH 1
|
604
|
+
INCREMENT BY 1
|
605
|
+
NO MINVALUE
|
606
|
+
NO MAXVALUE
|
607
|
+
CACHE 1;
|
608
|
+
|
609
|
+
|
610
|
+
--
|
611
|
+
-- Name: notification_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
612
|
+
--
|
613
|
+
|
614
|
+
ALTER SEQUENCE notification_types_id_seq OWNED BY notification_types.id;
|
615
|
+
|
616
|
+
|
617
|
+
--
|
618
|
+
-- Name: notifications; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
619
|
+
--
|
620
|
+
|
621
|
+
CREATE TABLE notifications (
|
622
|
+
id integer NOT NULL,
|
623
|
+
user_id integer NOT NULL,
|
624
|
+
project_id integer,
|
625
|
+
dismissed boolean DEFAULT false NOT NULL,
|
626
|
+
created_at timestamp without time zone,
|
627
|
+
updated_at timestamp without time zone,
|
628
|
+
notification_type_id integer NOT NULL,
|
629
|
+
backer_id integer,
|
630
|
+
update_id integer
|
631
|
+
);
|
632
|
+
|
633
|
+
|
634
|
+
--
|
635
|
+
-- Name: notifications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
636
|
+
--
|
637
|
+
|
638
|
+
CREATE SEQUENCE notifications_id_seq
|
639
|
+
START WITH 1
|
640
|
+
INCREMENT BY 1
|
641
|
+
NO MINVALUE
|
642
|
+
NO MAXVALUE
|
643
|
+
CACHE 1;
|
644
|
+
|
645
|
+
|
646
|
+
--
|
647
|
+
-- Name: notifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
648
|
+
--
|
649
|
+
|
650
|
+
ALTER SEQUENCE notifications_id_seq OWNED BY notifications.id;
|
651
|
+
|
652
|
+
|
653
|
+
--
|
654
|
+
-- Name: oauth_providers; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
655
|
+
--
|
656
|
+
|
657
|
+
CREATE TABLE oauth_providers (
|
658
|
+
id integer NOT NULL,
|
659
|
+
name text NOT NULL,
|
660
|
+
key text NOT NULL,
|
661
|
+
secret text NOT NULL,
|
662
|
+
scope text,
|
663
|
+
"order" integer,
|
664
|
+
created_at timestamp without time zone,
|
665
|
+
updated_at timestamp without time zone,
|
666
|
+
strategy text,
|
667
|
+
path text,
|
668
|
+
CONSTRAINT oauth_providers_key_not_blank CHECK ((length(btrim(key)) > 0)),
|
669
|
+
CONSTRAINT oauth_providers_name_not_blank CHECK ((length(btrim(name)) > 0)),
|
670
|
+
CONSTRAINT oauth_providers_secret_not_blank CHECK ((length(btrim(secret)) > 0))
|
671
|
+
);
|
672
|
+
|
673
|
+
|
674
|
+
--
|
675
|
+
-- Name: oauth_providers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
676
|
+
--
|
677
|
+
|
678
|
+
CREATE SEQUENCE oauth_providers_id_seq
|
679
|
+
START WITH 1
|
680
|
+
INCREMENT BY 1
|
681
|
+
NO MINVALUE
|
682
|
+
NO MAXVALUE
|
683
|
+
CACHE 1;
|
684
|
+
|
685
|
+
|
686
|
+
--
|
687
|
+
-- Name: oauth_providers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
688
|
+
--
|
689
|
+
|
690
|
+
ALTER SEQUENCE oauth_providers_id_seq OWNED BY oauth_providers.id;
|
691
|
+
|
692
|
+
|
693
|
+
--
|
694
|
+
-- Name: payment_notifications; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
695
|
+
--
|
696
|
+
|
697
|
+
CREATE TABLE payment_notifications (
|
698
|
+
id integer NOT NULL,
|
699
|
+
backer_id integer NOT NULL,
|
700
|
+
extra_data text,
|
701
|
+
created_at timestamp without time zone NOT NULL,
|
702
|
+
updated_at timestamp without time zone NOT NULL
|
703
|
+
);
|
704
|
+
|
705
|
+
|
706
|
+
--
|
707
|
+
-- Name: payment_notifications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
708
|
+
--
|
709
|
+
|
710
|
+
CREATE SEQUENCE payment_notifications_id_seq
|
711
|
+
START WITH 1
|
712
|
+
INCREMENT BY 1
|
713
|
+
NO MINVALUE
|
714
|
+
NO MAXVALUE
|
715
|
+
CACHE 1;
|
716
|
+
|
717
|
+
|
718
|
+
--
|
719
|
+
-- Name: payment_notifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
720
|
+
--
|
721
|
+
|
722
|
+
ALTER SEQUENCE payment_notifications_id_seq OWNED BY payment_notifications.id;
|
723
|
+
|
724
|
+
|
725
|
+
--
|
726
|
+
-- Name: paypal_payments; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
727
|
+
--
|
728
|
+
|
729
|
+
CREATE TABLE paypal_payments (
|
730
|
+
data text,
|
731
|
+
hora text,
|
732
|
+
fusohorario text,
|
733
|
+
nome text,
|
734
|
+
tipo text,
|
735
|
+
status text,
|
736
|
+
moeda text,
|
737
|
+
valorbruto text,
|
738
|
+
tarifa text,
|
739
|
+
liquido text,
|
740
|
+
doe_mail text,
|
741
|
+
parae_mail text,
|
742
|
+
iddatransacao text,
|
743
|
+
statusdoequivalente text,
|
744
|
+
statusdoendereco text,
|
745
|
+
titulodoitem text,
|
746
|
+
iddoitem text,
|
747
|
+
valordoenvioemanuseio text,
|
748
|
+
valordoseguro text,
|
749
|
+
impostosobrevendas text,
|
750
|
+
opcao1nome text,
|
751
|
+
opcao1valor text,
|
752
|
+
opcao2nome text,
|
753
|
+
opcao2valor text,
|
754
|
+
sitedoleilao text,
|
755
|
+
iddocomprador text,
|
756
|
+
urldoitem text,
|
757
|
+
datadetermino text,
|
758
|
+
iddaescritura text,
|
759
|
+
iddafatura text,
|
760
|
+
"idtxn_dereferência" text,
|
761
|
+
numerodafatura text,
|
762
|
+
numeropersonalizado text,
|
763
|
+
iddorecibo text,
|
764
|
+
saldo text,
|
765
|
+
enderecolinha1 text,
|
766
|
+
enderecolinha2_distrito_bairro text,
|
767
|
+
cidade text,
|
768
|
+
"estado_regiao_território_prefeitura_republica" text,
|
769
|
+
cep text,
|
770
|
+
pais text,
|
771
|
+
numerodotelefoneparacontato text,
|
772
|
+
extra text
|
773
|
+
);
|
774
|
+
|
775
|
+
|
776
|
+
--
|
777
|
+
-- Name: project_totals; Type: VIEW; Schema: public; Owner: -
|
778
|
+
--
|
779
|
+
|
780
|
+
CREATE VIEW project_totals AS
|
781
|
+
SELECT backers.project_id,
|
782
|
+
sum(backers.value) AS pledged,
|
783
|
+
sum(backers.payment_service_fee) AS total_payment_service_fee,
|
784
|
+
count(*) AS total_backers
|
785
|
+
FROM backers
|
786
|
+
WHERE ((backers.state)::text = ANY ((ARRAY['confirmed'::character varying, 'refunded'::character varying, 'requested_refund'::character varying])::text[]))
|
787
|
+
GROUP BY backers.project_id;
|
788
|
+
|
789
|
+
|
790
|
+
--
|
791
|
+
-- Name: projects_by_periods; Type: VIEW; Schema: public; Owner: -
|
792
|
+
--
|
793
|
+
|
794
|
+
CREATE VIEW projects_by_periods AS
|
795
|
+
WITH weeks AS (
|
796
|
+
SELECT (generate_series.generate_series * 7) AS days
|
797
|
+
FROM generate_series(0, 7) generate_series(generate_series)
|
798
|
+
), current_period AS (
|
799
|
+
SELECT 'current_period'::text AS series,
|
800
|
+
count(*) AS count,
|
801
|
+
(w.days / 7) AS week
|
802
|
+
FROM (projects p
|
803
|
+
RIGHT JOIN weeks w ON ((((p.created_at)::date >= ((('now'::text)::date - w.days) - 7)) AND (p.created_at < (('now'::text)::date - w.days)))))
|
804
|
+
GROUP BY (w.days / 7)
|
805
|
+
), previous_period AS (
|
806
|
+
SELECT 'previous_period'::text AS series,
|
807
|
+
count(*) AS count,
|
808
|
+
(w.days / 7) AS week
|
809
|
+
FROM (projects p
|
810
|
+
RIGHT JOIN weeks w ON ((((p.created_at)::date >= (((('now'::text)::date - w.days) - 7) - 56)) AND (p.created_at < ((('now'::text)::date - w.days) - 56)))))
|
811
|
+
GROUP BY (w.days / 7)
|
812
|
+
), last_year AS (
|
813
|
+
SELECT 'last_year'::text AS series,
|
814
|
+
count(*) AS count,
|
815
|
+
(w.days / 7) AS week
|
816
|
+
FROM (projects p
|
817
|
+
RIGHT JOIN weeks w ON ((((p.created_at)::date >= (((('now'::text)::date - w.days) - 7) - 365)) AND (p.created_at < ((('now'::text)::date - w.days) - 365)))))
|
818
|
+
GROUP BY (w.days / 7)
|
819
|
+
)
|
820
|
+
( SELECT current_period.series,
|
821
|
+
current_period.count,
|
822
|
+
current_period.week
|
823
|
+
FROM current_period
|
824
|
+
UNION ALL
|
825
|
+
SELECT previous_period.series,
|
826
|
+
previous_period.count,
|
827
|
+
previous_period.week
|
828
|
+
FROM previous_period)
|
829
|
+
UNION ALL
|
830
|
+
SELECT last_year.series,
|
831
|
+
last_year.count,
|
832
|
+
last_year.week
|
833
|
+
FROM last_year
|
834
|
+
ORDER BY 1, 3;
|
835
|
+
|
836
|
+
|
837
|
+
--
|
838
|
+
-- Name: projects_curated_pages; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
839
|
+
--
|
840
|
+
|
841
|
+
CREATE TABLE projects_curated_pages (
|
842
|
+
id integer NOT NULL,
|
843
|
+
project_id integer,
|
844
|
+
curated_page_id integer,
|
845
|
+
description text,
|
846
|
+
created_at timestamp without time zone,
|
847
|
+
updated_at timestamp without time zone,
|
848
|
+
description_html text
|
849
|
+
);
|
850
|
+
|
851
|
+
|
852
|
+
--
|
853
|
+
-- Name: projects_curated_pages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
854
|
+
--
|
855
|
+
|
856
|
+
CREATE SEQUENCE projects_curated_pages_id_seq
|
857
|
+
START WITH 1
|
858
|
+
INCREMENT BY 1
|
859
|
+
NO MINVALUE
|
860
|
+
NO MAXVALUE
|
861
|
+
CACHE 1;
|
862
|
+
|
863
|
+
|
864
|
+
--
|
865
|
+
-- Name: projects_curated_pages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
866
|
+
--
|
867
|
+
|
868
|
+
ALTER SEQUENCE projects_curated_pages_id_seq OWNED BY projects_curated_pages.id;
|
869
|
+
|
870
|
+
|
871
|
+
--
|
872
|
+
-- Name: projects_for_home; Type: VIEW; Schema: public; Owner: -
|
873
|
+
--
|
874
|
+
|
875
|
+
CREATE VIEW projects_for_home AS
|
876
|
+
WITH recommended_projects AS (
|
877
|
+
SELECT 'recommended'::text AS origin,
|
878
|
+
recommends.id,
|
879
|
+
recommends.name,
|
880
|
+
recommends.user_id,
|
881
|
+
recommends.category_id,
|
882
|
+
recommends.goal,
|
883
|
+
recommends.about,
|
884
|
+
recommends.headline,
|
885
|
+
recommends.video_url,
|
886
|
+
recommends.short_url,
|
887
|
+
recommends.created_at,
|
888
|
+
recommends.updated_at,
|
889
|
+
recommends.about_html,
|
890
|
+
recommends.recommended,
|
891
|
+
recommends.home_page_comment,
|
892
|
+
recommends.permalink,
|
893
|
+
recommends.video_thumbnail,
|
894
|
+
recommends.state,
|
895
|
+
recommends.online_days,
|
896
|
+
recommends.online_date,
|
897
|
+
recommends.how_know,
|
898
|
+
recommends.more_links,
|
899
|
+
recommends.first_backers,
|
900
|
+
recommends.uploaded_image,
|
901
|
+
recommends.video_embed_url
|
902
|
+
FROM projects recommends
|
903
|
+
WHERE (recommends.recommended AND ((recommends.state)::text = 'online'::text))
|
904
|
+
ORDER BY random()
|
905
|
+
LIMIT 3
|
906
|
+
), recents_projects AS (
|
907
|
+
SELECT 'recents'::text AS origin,
|
908
|
+
recents.id,
|
909
|
+
recents.name,
|
910
|
+
recents.user_id,
|
911
|
+
recents.category_id,
|
912
|
+
recents.goal,
|
913
|
+
recents.about,
|
914
|
+
recents.headline,
|
915
|
+
recents.video_url,
|
916
|
+
recents.short_url,
|
917
|
+
recents.created_at,
|
918
|
+
recents.updated_at,
|
919
|
+
recents.about_html,
|
920
|
+
recents.recommended,
|
921
|
+
recents.home_page_comment,
|
922
|
+
recents.permalink,
|
923
|
+
recents.video_thumbnail,
|
924
|
+
recents.state,
|
925
|
+
recents.online_days,
|
926
|
+
recents.online_date,
|
927
|
+
recents.how_know,
|
928
|
+
recents.more_links,
|
929
|
+
recents.first_backers,
|
930
|
+
recents.uploaded_image,
|
931
|
+
recents.video_embed_url
|
932
|
+
FROM projects recents
|
933
|
+
WHERE ((((recents.state)::text = 'online'::text) AND ((now() - recents.online_date) <= '5 days'::interval)) AND (NOT (recents.id IN ( SELECT recommends.id
|
934
|
+
FROM recommended_projects recommends))))
|
935
|
+
ORDER BY random()
|
936
|
+
LIMIT 3
|
937
|
+
), expiring_projects AS (
|
938
|
+
SELECT 'expiring'::text AS origin,
|
939
|
+
expiring.id,
|
940
|
+
expiring.name,
|
941
|
+
expiring.user_id,
|
942
|
+
expiring.category_id,
|
943
|
+
expiring.goal,
|
944
|
+
expiring.about,
|
945
|
+
expiring.headline,
|
946
|
+
expiring.video_url,
|
947
|
+
expiring.short_url,
|
948
|
+
expiring.created_at,
|
949
|
+
expiring.updated_at,
|
950
|
+
expiring.about_html,
|
951
|
+
expiring.recommended,
|
952
|
+
expiring.home_page_comment,
|
953
|
+
expiring.permalink,
|
954
|
+
expiring.video_thumbnail,
|
955
|
+
expiring.state,
|
956
|
+
expiring.online_days,
|
957
|
+
expiring.online_date,
|
958
|
+
expiring.how_know,
|
959
|
+
expiring.more_links,
|
960
|
+
expiring.first_backers,
|
961
|
+
expiring.uploaded_image,
|
962
|
+
expiring.video_embed_url
|
963
|
+
FROM projects expiring
|
964
|
+
WHERE ((((expiring.state)::text = 'online'::text) AND (expires_at(expiring.*) <= (now() + '14 days'::interval))) AND (NOT (expiring.id IN ( SELECT recommends.id
|
965
|
+
FROM recommended_projects recommends
|
966
|
+
UNION
|
967
|
+
SELECT recents.id
|
968
|
+
FROM recents_projects recents))))
|
969
|
+
ORDER BY random()
|
970
|
+
LIMIT 3
|
971
|
+
)
|
972
|
+
( SELECT recommended_projects.origin,
|
973
|
+
recommended_projects.id,
|
974
|
+
recommended_projects.name,
|
975
|
+
recommended_projects.user_id,
|
976
|
+
recommended_projects.category_id,
|
977
|
+
recommended_projects.goal,
|
978
|
+
recommended_projects.about,
|
979
|
+
recommended_projects.headline,
|
980
|
+
recommended_projects.video_url,
|
981
|
+
recommended_projects.short_url,
|
982
|
+
recommended_projects.created_at,
|
983
|
+
recommended_projects.updated_at,
|
984
|
+
recommended_projects.about_html,
|
985
|
+
recommended_projects.recommended,
|
986
|
+
recommended_projects.home_page_comment,
|
987
|
+
recommended_projects.permalink,
|
988
|
+
recommended_projects.video_thumbnail,
|
989
|
+
recommended_projects.state,
|
990
|
+
recommended_projects.online_days,
|
991
|
+
recommended_projects.online_date,
|
992
|
+
recommended_projects.how_know,
|
993
|
+
recommended_projects.more_links,
|
994
|
+
recommended_projects.first_backers,
|
995
|
+
recommended_projects.uploaded_image,
|
996
|
+
recommended_projects.video_embed_url
|
997
|
+
FROM recommended_projects
|
998
|
+
UNION
|
999
|
+
SELECT recents_projects.origin,
|
1000
|
+
recents_projects.id,
|
1001
|
+
recents_projects.name,
|
1002
|
+
recents_projects.user_id,
|
1003
|
+
recents_projects.category_id,
|
1004
|
+
recents_projects.goal,
|
1005
|
+
recents_projects.about,
|
1006
|
+
recents_projects.headline,
|
1007
|
+
recents_projects.video_url,
|
1008
|
+
recents_projects.short_url,
|
1009
|
+
recents_projects.created_at,
|
1010
|
+
recents_projects.updated_at,
|
1011
|
+
recents_projects.about_html,
|
1012
|
+
recents_projects.recommended,
|
1013
|
+
recents_projects.home_page_comment,
|
1014
|
+
recents_projects.permalink,
|
1015
|
+
recents_projects.video_thumbnail,
|
1016
|
+
recents_projects.state,
|
1017
|
+
recents_projects.online_days,
|
1018
|
+
recents_projects.online_date,
|
1019
|
+
recents_projects.how_know,
|
1020
|
+
recents_projects.more_links,
|
1021
|
+
recents_projects.first_backers,
|
1022
|
+
recents_projects.uploaded_image,
|
1023
|
+
recents_projects.video_embed_url
|
1024
|
+
FROM recents_projects)
|
1025
|
+
UNION
|
1026
|
+
SELECT expiring_projects.origin,
|
1027
|
+
expiring_projects.id,
|
1028
|
+
expiring_projects.name,
|
1029
|
+
expiring_projects.user_id,
|
1030
|
+
expiring_projects.category_id,
|
1031
|
+
expiring_projects.goal,
|
1032
|
+
expiring_projects.about,
|
1033
|
+
expiring_projects.headline,
|
1034
|
+
expiring_projects.video_url,
|
1035
|
+
expiring_projects.short_url,
|
1036
|
+
expiring_projects.created_at,
|
1037
|
+
expiring_projects.updated_at,
|
1038
|
+
expiring_projects.about_html,
|
1039
|
+
expiring_projects.recommended,
|
1040
|
+
expiring_projects.home_page_comment,
|
1041
|
+
expiring_projects.permalink,
|
1042
|
+
expiring_projects.video_thumbnail,
|
1043
|
+
expiring_projects.state,
|
1044
|
+
expiring_projects.online_days,
|
1045
|
+
expiring_projects.online_date,
|
1046
|
+
expiring_projects.how_know,
|
1047
|
+
expiring_projects.more_links,
|
1048
|
+
expiring_projects.first_backers,
|
1049
|
+
expiring_projects.uploaded_image,
|
1050
|
+
expiring_projects.video_embed_url
|
1051
|
+
FROM expiring_projects;
|
1052
|
+
|
1053
|
+
|
1054
|
+
--
|
1055
|
+
-- Name: projects_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
1056
|
+
--
|
1057
|
+
|
1058
|
+
CREATE SEQUENCE projects_id_seq
|
1059
|
+
START WITH 1
|
1060
|
+
INCREMENT BY 1
|
1061
|
+
NO MINVALUE
|
1062
|
+
NO MAXVALUE
|
1063
|
+
CACHE 1;
|
1064
|
+
|
1065
|
+
|
1066
|
+
--
|
1067
|
+
-- Name: projects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
1068
|
+
--
|
1069
|
+
|
1070
|
+
ALTER SEQUENCE projects_id_seq OWNED BY projects.id;
|
1071
|
+
|
1072
|
+
|
1073
|
+
--
|
1074
|
+
-- Name: recommendations; Type: VIEW; Schema: public; Owner: -
|
1075
|
+
--
|
1076
|
+
|
1077
|
+
CREATE VIEW recommendations AS
|
1078
|
+
SELECT recommendations.user_id,
|
1079
|
+
recommendations.project_id,
|
1080
|
+
recommendations.count
|
1081
|
+
FROM ( SELECT b.user_id,
|
1082
|
+
recommendations_1.id AS project_id,
|
1083
|
+
count(DISTINCT recommenders.user_id) AS count
|
1084
|
+
FROM ((((backers b
|
1085
|
+
JOIN projects p ON ((p.id = b.project_id)))
|
1086
|
+
JOIN backers backers_same_projects ON ((p.id = backers_same_projects.project_id)))
|
1087
|
+
JOIN backers recommenders ON ((recommenders.user_id = backers_same_projects.user_id)))
|
1088
|
+
JOIN projects recommendations_1 ON ((recommendations_1.id = recommenders.project_id)))
|
1089
|
+
WHERE ((((((((b.state)::text = 'confirmed'::text) AND ((backers_same_projects.state)::text = 'confirmed'::text)) AND ((recommenders.state)::text = 'confirmed'::text)) AND (b.user_id <> backers_same_projects.user_id)) AND (recommendations_1.id <> b.project_id)) AND ((recommendations_1.state)::text = 'online'::text)) AND (NOT (EXISTS ( SELECT true AS bool
|
1090
|
+
FROM backers b2
|
1091
|
+
WHERE ((((b2.state)::text = 'confirmed'::text) AND (b2.user_id = b.user_id)) AND (b2.project_id = recommendations_1.id))))))
|
1092
|
+
GROUP BY b.user_id, recommendations_1.id
|
1093
|
+
UNION
|
1094
|
+
SELECT b.user_id,
|
1095
|
+
recommendations_1.id AS project_id,
|
1096
|
+
0 AS count
|
1097
|
+
FROM ((backers b
|
1098
|
+
JOIN projects p ON ((b.project_id = p.id)))
|
1099
|
+
JOIN projects recommendations_1 ON ((recommendations_1.category_id = p.category_id)))
|
1100
|
+
WHERE ((b.state)::text = 'confirmed'::text)) recommendations
|
1101
|
+
WHERE (NOT (EXISTS ( SELECT true AS bool
|
1102
|
+
FROM backers b2
|
1103
|
+
WHERE ((((b2.state)::text = 'confirmed'::text) AND (b2.user_id = recommendations.user_id)) AND (b2.project_id = recommendations.project_id)))))
|
1104
|
+
ORDER BY recommendations.count DESC;
|
1105
|
+
|
1106
|
+
|
1107
|
+
--
|
1108
|
+
-- Name: reward_ranges; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
1109
|
+
--
|
1110
|
+
|
1111
|
+
CREATE TABLE reward_ranges (
|
1112
|
+
name text NOT NULL,
|
1113
|
+
lower numeric,
|
1114
|
+
upper numeric
|
1115
|
+
);
|
1116
|
+
|
1117
|
+
|
1118
|
+
--
|
1119
|
+
-- Name: rewards_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
1120
|
+
--
|
1121
|
+
|
1122
|
+
CREATE SEQUENCE rewards_id_seq
|
1123
|
+
START WITH 1
|
1124
|
+
INCREMENT BY 1
|
1125
|
+
NO MINVALUE
|
1126
|
+
NO MAXVALUE
|
1127
|
+
CACHE 1;
|
1128
|
+
|
1129
|
+
|
1130
|
+
--
|
1131
|
+
-- Name: rewards_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
1132
|
+
--
|
1133
|
+
|
1134
|
+
ALTER SEQUENCE rewards_id_seq OWNED BY rewards.id;
|
1135
|
+
|
1136
|
+
|
1137
|
+
--
|
1138
|
+
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
1139
|
+
--
|
1140
|
+
|
1141
|
+
CREATE TABLE schema_migrations (
|
1142
|
+
version character varying(255) NOT NULL
|
1143
|
+
);
|
1144
|
+
|
1145
|
+
|
1146
|
+
--
|
1147
|
+
-- Name: sessions; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
1148
|
+
--
|
1149
|
+
|
1150
|
+
CREATE TABLE sessions (
|
1151
|
+
id integer NOT NULL,
|
1152
|
+
session_id character varying(255) NOT NULL,
|
1153
|
+
data text,
|
1154
|
+
created_at timestamp without time zone NOT NULL,
|
1155
|
+
updated_at timestamp without time zone NOT NULL
|
1156
|
+
);
|
1157
|
+
|
1158
|
+
|
1159
|
+
--
|
1160
|
+
-- Name: sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
1161
|
+
--
|
1162
|
+
|
1163
|
+
CREATE SEQUENCE sessions_id_seq
|
1164
|
+
START WITH 1
|
1165
|
+
INCREMENT BY 1
|
1166
|
+
NO MINVALUE
|
1167
|
+
NO MAXVALUE
|
1168
|
+
CACHE 1;
|
1169
|
+
|
1170
|
+
|
1171
|
+
--
|
1172
|
+
-- Name: sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
1173
|
+
--
|
1174
|
+
|
1175
|
+
ALTER SEQUENCE sessions_id_seq OWNED BY sessions.id;
|
1176
|
+
|
1177
|
+
|
1178
|
+
--
|
1179
|
+
-- Name: states; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
1180
|
+
--
|
1181
|
+
|
1182
|
+
CREATE TABLE states (
|
1183
|
+
id integer NOT NULL,
|
1184
|
+
name character varying(255) NOT NULL,
|
1185
|
+
acronym character varying(255) NOT NULL,
|
1186
|
+
created_at timestamp without time zone,
|
1187
|
+
updated_at timestamp without time zone,
|
1188
|
+
CONSTRAINT states_acronym_not_blank CHECK ((length(btrim((acronym)::text)) > 0)),
|
1189
|
+
CONSTRAINT states_name_not_blank CHECK ((length(btrim((name)::text)) > 0))
|
1190
|
+
);
|
1191
|
+
|
1192
|
+
|
1193
|
+
--
|
1194
|
+
-- Name: states_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
1195
|
+
--
|
1196
|
+
|
1197
|
+
CREATE SEQUENCE states_id_seq
|
1198
|
+
START WITH 1
|
1199
|
+
INCREMENT BY 1
|
1200
|
+
NO MINVALUE
|
1201
|
+
NO MAXVALUE
|
1202
|
+
CACHE 1;
|
1203
|
+
|
1204
|
+
|
1205
|
+
--
|
1206
|
+
-- Name: states_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
1207
|
+
--
|
1208
|
+
|
1209
|
+
ALTER SEQUENCE states_id_seq OWNED BY states.id;
|
1210
|
+
|
1211
|
+
|
1212
|
+
--
|
1213
|
+
-- Name: statistics; Type: VIEW; Schema: public; Owner: -
|
1214
|
+
--
|
1215
|
+
|
1216
|
+
CREATE VIEW statistics AS
|
1217
|
+
SELECT ( SELECT count(*) AS count
|
1218
|
+
FROM users) AS total_users,
|
1219
|
+
backers_totals.total_backs,
|
1220
|
+
backers_totals.total_backers,
|
1221
|
+
backers_totals.total_backed,
|
1222
|
+
projects_totals.total_projects,
|
1223
|
+
projects_totals.total_projects_success,
|
1224
|
+
projects_totals.total_projects_online
|
1225
|
+
FROM ( SELECT count(*) AS total_backs,
|
1226
|
+
count(DISTINCT backers.user_id) AS total_backers,
|
1227
|
+
sum(backers.value) AS total_backed
|
1228
|
+
FROM backers
|
1229
|
+
WHERE ((backers.state)::text <> ALL (ARRAY[('waiting_confirmation'::character varying)::text, ('pending'::character varying)::text, ('canceled'::character varying)::text, 'deleted'::text]))) backers_totals,
|
1230
|
+
( SELECT count(*) AS total_projects,
|
1231
|
+
count(
|
1232
|
+
CASE
|
1233
|
+
WHEN ((projects.state)::text = 'successful'::text) THEN 1
|
1234
|
+
ELSE NULL::integer
|
1235
|
+
END) AS total_projects_success,
|
1236
|
+
count(
|
1237
|
+
CASE
|
1238
|
+
WHEN ((projects.state)::text = 'online'::text) THEN 1
|
1239
|
+
ELSE NULL::integer
|
1240
|
+
END) AS total_projects_online
|
1241
|
+
FROM projects
|
1242
|
+
WHERE ((projects.state)::text <> ALL (ARRAY[('draft'::character varying)::text, ('rejected'::character varying)::text]))) projects_totals;
|
1243
|
+
|
1244
|
+
|
1245
|
+
--
|
1246
|
+
-- Name: subscriber_reports; Type: VIEW; Schema: public; Owner: -
|
1247
|
+
--
|
1248
|
+
|
1249
|
+
CREATE VIEW subscriber_reports AS
|
1250
|
+
SELECT u.id,
|
1251
|
+
cs.channel_id,
|
1252
|
+
u.name,
|
1253
|
+
u.email
|
1254
|
+
FROM (users u
|
1255
|
+
JOIN channels_subscribers cs ON ((cs.user_id = u.id)));
|
1256
|
+
|
1257
|
+
|
1258
|
+
--
|
1259
|
+
-- Name: total_backed_ranges; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
1260
|
+
--
|
1261
|
+
|
1262
|
+
CREATE TABLE total_backed_ranges (
|
1263
|
+
name text NOT NULL,
|
1264
|
+
lower numeric,
|
1265
|
+
upper numeric
|
1266
|
+
);
|
1267
|
+
|
1268
|
+
|
1269
|
+
--
|
1270
|
+
-- Name: unsubscribes; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
1271
|
+
--
|
1272
|
+
|
1273
|
+
CREATE TABLE unsubscribes (
|
1274
|
+
id integer NOT NULL,
|
1275
|
+
user_id integer NOT NULL,
|
1276
|
+
notification_type_id integer NOT NULL,
|
1277
|
+
project_id integer,
|
1278
|
+
created_at timestamp without time zone NOT NULL,
|
1279
|
+
updated_at timestamp without time zone NOT NULL
|
1280
|
+
);
|
1281
|
+
|
1282
|
+
|
1283
|
+
--
|
1284
|
+
-- Name: unsubscribes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
1285
|
+
--
|
1286
|
+
|
1287
|
+
CREATE SEQUENCE unsubscribes_id_seq
|
1288
|
+
START WITH 1
|
1289
|
+
INCREMENT BY 1
|
1290
|
+
NO MINVALUE
|
1291
|
+
NO MAXVALUE
|
1292
|
+
CACHE 1;
|
1293
|
+
|
1294
|
+
|
1295
|
+
--
|
1296
|
+
-- Name: unsubscribes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
1297
|
+
--
|
1298
|
+
|
1299
|
+
ALTER SEQUENCE unsubscribes_id_seq OWNED BY unsubscribes.id;
|
1300
|
+
|
1301
|
+
|
1302
|
+
--
|
1303
|
+
-- Name: updates; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
1304
|
+
--
|
1305
|
+
|
1306
|
+
CREATE TABLE updates (
|
1307
|
+
id integer NOT NULL,
|
1308
|
+
user_id integer NOT NULL,
|
1309
|
+
project_id integer NOT NULL,
|
1310
|
+
title text,
|
1311
|
+
comment text NOT NULL,
|
1312
|
+
comment_html text NOT NULL,
|
1313
|
+
created_at timestamp without time zone,
|
1314
|
+
updated_at timestamp without time zone,
|
1315
|
+
exclusive boolean DEFAULT false
|
1316
|
+
);
|
1317
|
+
|
1318
|
+
|
1319
|
+
--
|
1320
|
+
-- Name: updates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
1321
|
+
--
|
1322
|
+
|
1323
|
+
CREATE SEQUENCE updates_id_seq
|
1324
|
+
START WITH 1
|
1325
|
+
INCREMENT BY 1
|
1326
|
+
NO MINVALUE
|
1327
|
+
NO MAXVALUE
|
1328
|
+
CACHE 1;
|
1329
|
+
|
1330
|
+
|
1331
|
+
--
|
1332
|
+
-- Name: updates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
1333
|
+
--
|
1334
|
+
|
1335
|
+
ALTER SEQUENCE updates_id_seq OWNED BY updates.id;
|
1336
|
+
|
1337
|
+
|
1338
|
+
--
|
1339
|
+
-- Name: user_totals; Type: VIEW; Schema: public; Owner: -
|
1340
|
+
--
|
1341
|
+
|
1342
|
+
CREATE VIEW user_totals AS
|
1343
|
+
SELECT b.user_id AS id,
|
1344
|
+
b.user_id,
|
1345
|
+
count(DISTINCT b.project_id) AS total_backed_projects,
|
1346
|
+
sum(b.value) AS sum,
|
1347
|
+
count(*) AS count,
|
1348
|
+
sum(
|
1349
|
+
CASE
|
1350
|
+
WHEN (((p.state)::text <> 'failed'::text) AND (NOT b.credits)) THEN (0)::numeric
|
1351
|
+
WHEN (((p.state)::text = 'failed'::text) AND b.credits) THEN (0)::numeric
|
1352
|
+
WHEN (((p.state)::text = 'failed'::text) AND ((((b.state)::text = ANY ((ARRAY['requested_refund'::character varying, 'refunded'::character varying])::text[])) AND (NOT b.credits)) OR (b.credits AND (NOT ((b.state)::text = ANY ((ARRAY['requested_refund'::character varying, 'refunded'::character varying])::text[])))))) THEN (0)::numeric
|
1353
|
+
WHEN ((((p.state)::text = 'failed'::text) AND (NOT b.credits)) AND ((b.state)::text = 'confirmed'::text)) THEN b.value
|
1354
|
+
ELSE (b.value * ((-1))::numeric)
|
1355
|
+
END) AS credits
|
1356
|
+
FROM (backers b
|
1357
|
+
JOIN projects p ON ((b.project_id = p.id)))
|
1358
|
+
WHERE ((b.state)::text = ANY ((ARRAY['confirmed'::character varying, 'requested_refund'::character varying, 'refunded'::character varying])::text[]))
|
1359
|
+
GROUP BY b.user_id;
|
1360
|
+
|
1361
|
+
|
1362
|
+
--
|
1363
|
+
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
1364
|
+
--
|
1365
|
+
|
1366
|
+
CREATE SEQUENCE users_id_seq
|
1367
|
+
START WITH 1
|
1368
|
+
INCREMENT BY 1
|
1369
|
+
NO MINVALUE
|
1370
|
+
NO MAXVALUE
|
1371
|
+
CACHE 1;
|
1372
|
+
|
1373
|
+
|
1374
|
+
--
|
1375
|
+
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
1376
|
+
--
|
1377
|
+
|
1378
|
+
ALTER SEQUENCE users_id_seq OWNED BY users.id;
|
1379
|
+
|
1380
|
+
|
1381
|
+
--
|
1382
|
+
-- Name: versions; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
1383
|
+
--
|
1384
|
+
|
1385
|
+
CREATE TABLE versions (
|
1386
|
+
id integer NOT NULL,
|
1387
|
+
item_type character varying(255) NOT NULL,
|
1388
|
+
item_id integer NOT NULL,
|
1389
|
+
event character varying(255) NOT NULL,
|
1390
|
+
whodunnit character varying(255),
|
1391
|
+
object text,
|
1392
|
+
created_at timestamp without time zone
|
1393
|
+
);
|
1394
|
+
|
1395
|
+
|
1396
|
+
--
|
1397
|
+
-- Name: versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
1398
|
+
--
|
1399
|
+
|
1400
|
+
CREATE SEQUENCE versions_id_seq
|
1401
|
+
START WITH 1
|
1402
|
+
INCREMENT BY 1
|
1403
|
+
NO MINVALUE
|
1404
|
+
NO MAXVALUE
|
1405
|
+
CACHE 1;
|
1406
|
+
|
1407
|
+
|
1408
|
+
--
|
1409
|
+
-- Name: versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
1410
|
+
--
|
1411
|
+
|
1412
|
+
ALTER SEQUENCE versions_id_seq OWNED BY versions.id;
|
1413
|
+
|
1414
|
+
|
1415
|
+
--
|
1416
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1417
|
+
--
|
1418
|
+
|
1419
|
+
ALTER TABLE ONLY authorizations ALTER COLUMN id SET DEFAULT nextval('authorizations_id_seq'::regclass);
|
1420
|
+
|
1421
|
+
|
1422
|
+
--
|
1423
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1424
|
+
--
|
1425
|
+
|
1426
|
+
ALTER TABLE ONLY backers ALTER COLUMN id SET DEFAULT nextval('backers_id_seq'::regclass);
|
1427
|
+
|
1428
|
+
|
1429
|
+
--
|
1430
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1431
|
+
--
|
1432
|
+
|
1433
|
+
ALTER TABLE ONLY categories ALTER COLUMN id SET DEFAULT nextval('categories_id_seq'::regclass);
|
1434
|
+
|
1435
|
+
|
1436
|
+
--
|
1437
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1438
|
+
--
|
1439
|
+
|
1440
|
+
ALTER TABLE ONLY channels ALTER COLUMN id SET DEFAULT nextval('channels_id_seq'::regclass);
|
1441
|
+
|
1442
|
+
|
1443
|
+
--
|
1444
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1445
|
+
--
|
1446
|
+
|
1447
|
+
ALTER TABLE ONLY channels_projects ALTER COLUMN id SET DEFAULT nextval('channels_projects_id_seq'::regclass);
|
1448
|
+
|
1449
|
+
|
1450
|
+
--
|
1451
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1452
|
+
--
|
1453
|
+
|
1454
|
+
ALTER TABLE ONLY channels_subscribers ALTER COLUMN id SET DEFAULT nextval('channels_subscribers_id_seq'::regclass);
|
1455
|
+
|
1456
|
+
|
1457
|
+
--
|
1458
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1459
|
+
--
|
1460
|
+
|
1461
|
+
ALTER TABLE ONLY channels_trustees ALTER COLUMN id SET DEFAULT nextval('channels_trustees_id_seq'::regclass);
|
1462
|
+
|
1463
|
+
|
1464
|
+
--
|
1465
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1466
|
+
--
|
1467
|
+
|
1468
|
+
ALTER TABLE ONLY configurations ALTER COLUMN id SET DEFAULT nextval('configurations_id_seq'::regclass);
|
1469
|
+
|
1470
|
+
|
1471
|
+
--
|
1472
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1473
|
+
--
|
1474
|
+
|
1475
|
+
ALTER TABLE ONLY notification_types ALTER COLUMN id SET DEFAULT nextval('notification_types_id_seq'::regclass);
|
1476
|
+
|
1477
|
+
|
1478
|
+
--
|
1479
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1480
|
+
--
|
1481
|
+
|
1482
|
+
ALTER TABLE ONLY notifications ALTER COLUMN id SET DEFAULT nextval('notifications_id_seq'::regclass);
|
1483
|
+
|
1484
|
+
|
1485
|
+
--
|
1486
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1487
|
+
--
|
1488
|
+
|
1489
|
+
ALTER TABLE ONLY oauth_providers ALTER COLUMN id SET DEFAULT nextval('oauth_providers_id_seq'::regclass);
|
1490
|
+
|
1491
|
+
|
1492
|
+
--
|
1493
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1494
|
+
--
|
1495
|
+
|
1496
|
+
ALTER TABLE ONLY payment_notifications ALTER COLUMN id SET DEFAULT nextval('payment_notifications_id_seq'::regclass);
|
1497
|
+
|
1498
|
+
|
1499
|
+
--
|
1500
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1501
|
+
--
|
1502
|
+
|
1503
|
+
ALTER TABLE ONLY projects ALTER COLUMN id SET DEFAULT nextval('projects_id_seq'::regclass);
|
1504
|
+
|
1505
|
+
|
1506
|
+
--
|
1507
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1508
|
+
--
|
1509
|
+
|
1510
|
+
ALTER TABLE ONLY projects_curated_pages ALTER COLUMN id SET DEFAULT nextval('projects_curated_pages_id_seq'::regclass);
|
1511
|
+
|
1512
|
+
|
1513
|
+
--
|
1514
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1515
|
+
--
|
1516
|
+
|
1517
|
+
ALTER TABLE ONLY rewards ALTER COLUMN id SET DEFAULT nextval('rewards_id_seq'::regclass);
|
1518
|
+
|
1519
|
+
|
1520
|
+
--
|
1521
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1522
|
+
--
|
1523
|
+
|
1524
|
+
ALTER TABLE ONLY sessions ALTER COLUMN id SET DEFAULT nextval('sessions_id_seq'::regclass);
|
1525
|
+
|
1526
|
+
|
1527
|
+
--
|
1528
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1529
|
+
--
|
1530
|
+
|
1531
|
+
ALTER TABLE ONLY states ALTER COLUMN id SET DEFAULT nextval('states_id_seq'::regclass);
|
1532
|
+
|
1533
|
+
|
1534
|
+
--
|
1535
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1536
|
+
--
|
1537
|
+
|
1538
|
+
ALTER TABLE ONLY unsubscribes ALTER COLUMN id SET DEFAULT nextval('unsubscribes_id_seq'::regclass);
|
1539
|
+
|
1540
|
+
|
1541
|
+
--
|
1542
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1543
|
+
--
|
1544
|
+
|
1545
|
+
ALTER TABLE ONLY updates ALTER COLUMN id SET DEFAULT nextval('updates_id_seq'::regclass);
|
1546
|
+
|
1547
|
+
|
1548
|
+
--
|
1549
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1550
|
+
--
|
1551
|
+
|
1552
|
+
ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
|
1553
|
+
|
1554
|
+
|
1555
|
+
--
|
1556
|
+
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
1557
|
+
--
|
1558
|
+
|
1559
|
+
ALTER TABLE ONLY versions ALTER COLUMN id SET DEFAULT nextval('versions_id_seq'::regclass);
|
1560
|
+
|
1561
|
+
|
1562
|
+
--
|
1563
|
+
-- Name: authorizations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1564
|
+
--
|
1565
|
+
|
1566
|
+
ALTER TABLE ONLY authorizations
|
1567
|
+
ADD CONSTRAINT authorizations_pkey PRIMARY KEY (id);
|
1568
|
+
|
1569
|
+
|
1570
|
+
--
|
1571
|
+
-- Name: backers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1572
|
+
--
|
1573
|
+
|
1574
|
+
ALTER TABLE ONLY backers
|
1575
|
+
ADD CONSTRAINT backers_pkey PRIMARY KEY (id);
|
1576
|
+
|
1577
|
+
|
1578
|
+
--
|
1579
|
+
-- Name: categories_name_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1580
|
+
--
|
1581
|
+
|
1582
|
+
ALTER TABLE ONLY categories
|
1583
|
+
ADD CONSTRAINT categories_name_unique UNIQUE (name_pt);
|
1584
|
+
|
1585
|
+
|
1586
|
+
--
|
1587
|
+
-- Name: categories_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1588
|
+
--
|
1589
|
+
|
1590
|
+
ALTER TABLE ONLY categories
|
1591
|
+
ADD CONSTRAINT categories_pkey PRIMARY KEY (id);
|
1592
|
+
|
1593
|
+
|
1594
|
+
--
|
1595
|
+
-- Name: channel_profiles_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1596
|
+
--
|
1597
|
+
|
1598
|
+
ALTER TABLE ONLY channels
|
1599
|
+
ADD CONSTRAINT channel_profiles_pkey PRIMARY KEY (id);
|
1600
|
+
|
1601
|
+
|
1602
|
+
--
|
1603
|
+
-- Name: channels_projects_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1604
|
+
--
|
1605
|
+
|
1606
|
+
ALTER TABLE ONLY channels_projects
|
1607
|
+
ADD CONSTRAINT channels_projects_pkey PRIMARY KEY (id);
|
1608
|
+
|
1609
|
+
|
1610
|
+
--
|
1611
|
+
-- Name: channels_subscribers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1612
|
+
--
|
1613
|
+
|
1614
|
+
ALTER TABLE ONLY channels_subscribers
|
1615
|
+
ADD CONSTRAINT channels_subscribers_pkey PRIMARY KEY (id);
|
1616
|
+
|
1617
|
+
|
1618
|
+
--
|
1619
|
+
-- Name: channels_trustees_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1620
|
+
--
|
1621
|
+
|
1622
|
+
ALTER TABLE ONLY channels_trustees
|
1623
|
+
ADD CONSTRAINT channels_trustees_pkey PRIMARY KEY (id);
|
1624
|
+
|
1625
|
+
|
1626
|
+
--
|
1627
|
+
-- Name: configurations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1628
|
+
--
|
1629
|
+
|
1630
|
+
ALTER TABLE ONLY configurations
|
1631
|
+
ADD CONSTRAINT configurations_pkey PRIMARY KEY (id);
|
1632
|
+
|
1633
|
+
|
1634
|
+
--
|
1635
|
+
-- Name: notification_types_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1636
|
+
--
|
1637
|
+
|
1638
|
+
ALTER TABLE ONLY notification_types
|
1639
|
+
ADD CONSTRAINT notification_types_pkey PRIMARY KEY (id);
|
1640
|
+
|
1641
|
+
|
1642
|
+
--
|
1643
|
+
-- Name: notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1644
|
+
--
|
1645
|
+
|
1646
|
+
ALTER TABLE ONLY notifications
|
1647
|
+
ADD CONSTRAINT notifications_pkey PRIMARY KEY (id);
|
1648
|
+
|
1649
|
+
|
1650
|
+
--
|
1651
|
+
-- Name: oauth_providers_name_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1652
|
+
--
|
1653
|
+
|
1654
|
+
ALTER TABLE ONLY oauth_providers
|
1655
|
+
ADD CONSTRAINT oauth_providers_name_unique UNIQUE (name);
|
1656
|
+
|
1657
|
+
|
1658
|
+
--
|
1659
|
+
-- Name: oauth_providers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1660
|
+
--
|
1661
|
+
|
1662
|
+
ALTER TABLE ONLY oauth_providers
|
1663
|
+
ADD CONSTRAINT oauth_providers_pkey PRIMARY KEY (id);
|
1664
|
+
|
1665
|
+
|
1666
|
+
--
|
1667
|
+
-- Name: payment_notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1668
|
+
--
|
1669
|
+
|
1670
|
+
ALTER TABLE ONLY payment_notifications
|
1671
|
+
ADD CONSTRAINT payment_notifications_pkey PRIMARY KEY (id);
|
1672
|
+
|
1673
|
+
|
1674
|
+
--
|
1675
|
+
-- Name: projects_curated_pages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1676
|
+
--
|
1677
|
+
|
1678
|
+
ALTER TABLE ONLY projects_curated_pages
|
1679
|
+
ADD CONSTRAINT projects_curated_pages_pkey PRIMARY KEY (id);
|
1680
|
+
|
1681
|
+
|
1682
|
+
--
|
1683
|
+
-- Name: projects_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1684
|
+
--
|
1685
|
+
|
1686
|
+
ALTER TABLE ONLY projects
|
1687
|
+
ADD CONSTRAINT projects_pkey PRIMARY KEY (id);
|
1688
|
+
|
1689
|
+
|
1690
|
+
--
|
1691
|
+
-- Name: reward_ranges_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1692
|
+
--
|
1693
|
+
|
1694
|
+
ALTER TABLE ONLY reward_ranges
|
1695
|
+
ADD CONSTRAINT reward_ranges_pkey PRIMARY KEY (name);
|
1696
|
+
|
1697
|
+
|
1698
|
+
--
|
1699
|
+
-- Name: rewards_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1700
|
+
--
|
1701
|
+
|
1702
|
+
ALTER TABLE ONLY rewards
|
1703
|
+
ADD CONSTRAINT rewards_pkey PRIMARY KEY (id);
|
1704
|
+
|
1705
|
+
|
1706
|
+
--
|
1707
|
+
-- Name: sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1708
|
+
--
|
1709
|
+
|
1710
|
+
ALTER TABLE ONLY sessions
|
1711
|
+
ADD CONSTRAINT sessions_pkey PRIMARY KEY (id);
|
1712
|
+
|
1713
|
+
|
1714
|
+
--
|
1715
|
+
-- Name: states_acronym_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1716
|
+
--
|
1717
|
+
|
1718
|
+
ALTER TABLE ONLY states
|
1719
|
+
ADD CONSTRAINT states_acronym_unique UNIQUE (acronym);
|
1720
|
+
|
1721
|
+
|
1722
|
+
--
|
1723
|
+
-- Name: states_name_unique; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1724
|
+
--
|
1725
|
+
|
1726
|
+
ALTER TABLE ONLY states
|
1727
|
+
ADD CONSTRAINT states_name_unique UNIQUE (name);
|
1728
|
+
|
1729
|
+
|
1730
|
+
--
|
1731
|
+
-- Name: states_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1732
|
+
--
|
1733
|
+
|
1734
|
+
ALTER TABLE ONLY states
|
1735
|
+
ADD CONSTRAINT states_pkey PRIMARY KEY (id);
|
1736
|
+
|
1737
|
+
|
1738
|
+
--
|
1739
|
+
-- Name: total_backed_ranges_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1740
|
+
--
|
1741
|
+
|
1742
|
+
ALTER TABLE ONLY total_backed_ranges
|
1743
|
+
ADD CONSTRAINT total_backed_ranges_pkey PRIMARY KEY (name);
|
1744
|
+
|
1745
|
+
|
1746
|
+
--
|
1747
|
+
-- Name: unsubscribes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1748
|
+
--
|
1749
|
+
|
1750
|
+
ALTER TABLE ONLY unsubscribes
|
1751
|
+
ADD CONSTRAINT unsubscribes_pkey PRIMARY KEY (id);
|
1752
|
+
|
1753
|
+
|
1754
|
+
--
|
1755
|
+
-- Name: updates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1756
|
+
--
|
1757
|
+
|
1758
|
+
ALTER TABLE ONLY updates
|
1759
|
+
ADD CONSTRAINT updates_pkey PRIMARY KEY (id);
|
1760
|
+
|
1761
|
+
|
1762
|
+
--
|
1763
|
+
-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1764
|
+
--
|
1765
|
+
|
1766
|
+
ALTER TABLE ONLY users
|
1767
|
+
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
|
1768
|
+
|
1769
|
+
|
1770
|
+
--
|
1771
|
+
-- Name: versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
1772
|
+
--
|
1773
|
+
|
1774
|
+
ALTER TABLE ONLY versions
|
1775
|
+
ADD CONSTRAINT versions_pkey PRIMARY KEY (id);
|
1776
|
+
|
1777
|
+
|
1778
|
+
--
|
1779
|
+
-- Name: fk__authorizations_oauth_provider_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1780
|
+
--
|
1781
|
+
|
1782
|
+
CREATE INDEX fk__authorizations_oauth_provider_id ON authorizations USING btree (oauth_provider_id);
|
1783
|
+
|
1784
|
+
|
1785
|
+
--
|
1786
|
+
-- Name: fk__authorizations_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1787
|
+
--
|
1788
|
+
|
1789
|
+
CREATE INDEX fk__authorizations_user_id ON authorizations USING btree (user_id);
|
1790
|
+
|
1791
|
+
|
1792
|
+
--
|
1793
|
+
-- Name: fk__channels_subscribers_channel_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1794
|
+
--
|
1795
|
+
|
1796
|
+
CREATE INDEX fk__channels_subscribers_channel_id ON channels_subscribers USING btree (channel_id);
|
1797
|
+
|
1798
|
+
|
1799
|
+
--
|
1800
|
+
-- Name: fk__channels_subscribers_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1801
|
+
--
|
1802
|
+
|
1803
|
+
CREATE INDEX fk__channels_subscribers_user_id ON channels_subscribers USING btree (user_id);
|
1804
|
+
|
1805
|
+
|
1806
|
+
--
|
1807
|
+
-- Name: index_authorizations_on_uid_and_oauth_provider_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1808
|
+
--
|
1809
|
+
|
1810
|
+
CREATE UNIQUE INDEX index_authorizations_on_uid_and_oauth_provider_id ON authorizations USING btree (uid, oauth_provider_id);
|
1811
|
+
|
1812
|
+
|
1813
|
+
--
|
1814
|
+
-- Name: index_backers_on_key; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1815
|
+
--
|
1816
|
+
|
1817
|
+
CREATE INDEX index_backers_on_key ON backers USING btree (key);
|
1818
|
+
|
1819
|
+
|
1820
|
+
--
|
1821
|
+
-- Name: index_backers_on_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1822
|
+
--
|
1823
|
+
|
1824
|
+
CREATE INDEX index_backers_on_project_id ON backers USING btree (project_id);
|
1825
|
+
|
1826
|
+
|
1827
|
+
--
|
1828
|
+
-- Name: index_backers_on_reward_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1829
|
+
--
|
1830
|
+
|
1831
|
+
CREATE INDEX index_backers_on_reward_id ON backers USING btree (reward_id);
|
1832
|
+
|
1833
|
+
|
1834
|
+
--
|
1835
|
+
-- Name: index_backers_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1836
|
+
--
|
1837
|
+
|
1838
|
+
CREATE INDEX index_backers_on_user_id ON backers USING btree (user_id);
|
1839
|
+
|
1840
|
+
|
1841
|
+
--
|
1842
|
+
-- Name: index_categories_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1843
|
+
--
|
1844
|
+
|
1845
|
+
CREATE INDEX index_categories_on_name ON categories USING btree (name_pt);
|
1846
|
+
|
1847
|
+
|
1848
|
+
--
|
1849
|
+
-- Name: index_channels_on_permalink; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1850
|
+
--
|
1851
|
+
|
1852
|
+
CREATE UNIQUE INDEX index_channels_on_permalink ON channels USING btree (permalink);
|
1853
|
+
|
1854
|
+
|
1855
|
+
--
|
1856
|
+
-- Name: index_channels_projects_on_channel_id_and_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1857
|
+
--
|
1858
|
+
|
1859
|
+
CREATE UNIQUE INDEX index_channels_projects_on_channel_id_and_project_id ON channels_projects USING btree (channel_id, project_id);
|
1860
|
+
|
1861
|
+
|
1862
|
+
--
|
1863
|
+
-- Name: index_channels_projects_on_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1864
|
+
--
|
1865
|
+
|
1866
|
+
CREATE INDEX index_channels_projects_on_project_id ON channels_projects USING btree (project_id);
|
1867
|
+
|
1868
|
+
|
1869
|
+
--
|
1870
|
+
-- Name: index_channels_subscribers_on_user_id_and_channel_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1871
|
+
--
|
1872
|
+
|
1873
|
+
CREATE UNIQUE INDEX index_channels_subscribers_on_user_id_and_channel_id ON channels_subscribers USING btree (user_id, channel_id);
|
1874
|
+
|
1875
|
+
|
1876
|
+
--
|
1877
|
+
-- Name: index_channels_trustees_on_channel_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1878
|
+
--
|
1879
|
+
|
1880
|
+
CREATE INDEX index_channels_trustees_on_channel_id ON channels_trustees USING btree (channel_id);
|
1881
|
+
|
1882
|
+
|
1883
|
+
--
|
1884
|
+
-- Name: index_channels_trustees_on_user_id_and_channel_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1885
|
+
--
|
1886
|
+
|
1887
|
+
CREATE UNIQUE INDEX index_channels_trustees_on_user_id_and_channel_id ON channels_trustees USING btree (user_id, channel_id);
|
1888
|
+
|
1889
|
+
|
1890
|
+
--
|
1891
|
+
-- Name: index_configurations_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1892
|
+
--
|
1893
|
+
|
1894
|
+
CREATE UNIQUE INDEX index_configurations_on_name ON configurations USING btree (name);
|
1895
|
+
|
1896
|
+
|
1897
|
+
--
|
1898
|
+
-- Name: index_notification_types_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1899
|
+
--
|
1900
|
+
|
1901
|
+
CREATE UNIQUE INDEX index_notification_types_on_name ON notification_types USING btree (name);
|
1902
|
+
|
1903
|
+
|
1904
|
+
--
|
1905
|
+
-- Name: index_notifications_on_update_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1906
|
+
--
|
1907
|
+
|
1908
|
+
CREATE INDEX index_notifications_on_update_id ON notifications USING btree (update_id);
|
1909
|
+
|
1910
|
+
|
1911
|
+
--
|
1912
|
+
-- Name: index_payment_notifications_on_backer_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1913
|
+
--
|
1914
|
+
|
1915
|
+
CREATE INDEX index_payment_notifications_on_backer_id ON payment_notifications USING btree (backer_id);
|
1916
|
+
|
1917
|
+
|
1918
|
+
--
|
1919
|
+
-- Name: index_projects_on_category_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1920
|
+
--
|
1921
|
+
|
1922
|
+
CREATE INDEX index_projects_on_category_id ON projects USING btree (category_id);
|
1923
|
+
|
1924
|
+
|
1925
|
+
--
|
1926
|
+
-- Name: index_projects_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1927
|
+
--
|
1928
|
+
|
1929
|
+
CREATE INDEX index_projects_on_name ON projects USING btree (name);
|
1930
|
+
|
1931
|
+
|
1932
|
+
--
|
1933
|
+
-- Name: index_projects_on_permalink; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1934
|
+
--
|
1935
|
+
|
1936
|
+
CREATE UNIQUE INDEX index_projects_on_permalink ON projects USING btree (permalink);
|
1937
|
+
|
1938
|
+
|
1939
|
+
--
|
1940
|
+
-- Name: index_projects_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1941
|
+
--
|
1942
|
+
|
1943
|
+
CREATE INDEX index_projects_on_user_id ON projects USING btree (user_id);
|
1944
|
+
|
1945
|
+
|
1946
|
+
--
|
1947
|
+
-- Name: index_rewards_on_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1948
|
+
--
|
1949
|
+
|
1950
|
+
CREATE INDEX index_rewards_on_project_id ON rewards USING btree (project_id);
|
1951
|
+
|
1952
|
+
|
1953
|
+
--
|
1954
|
+
-- Name: index_sessions_on_session_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1955
|
+
--
|
1956
|
+
|
1957
|
+
CREATE INDEX index_sessions_on_session_id ON sessions USING btree (session_id);
|
1958
|
+
|
1959
|
+
|
1960
|
+
--
|
1961
|
+
-- Name: index_sessions_on_updated_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1962
|
+
--
|
1963
|
+
|
1964
|
+
CREATE INDEX index_sessions_on_updated_at ON sessions USING btree (updated_at);
|
1965
|
+
|
1966
|
+
|
1967
|
+
--
|
1968
|
+
-- Name: index_unsubscribes_on_notification_type_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1969
|
+
--
|
1970
|
+
|
1971
|
+
CREATE INDEX index_unsubscribes_on_notification_type_id ON unsubscribes USING btree (notification_type_id);
|
1972
|
+
|
1973
|
+
|
1974
|
+
--
|
1975
|
+
-- Name: index_unsubscribes_on_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1976
|
+
--
|
1977
|
+
|
1978
|
+
CREATE INDEX index_unsubscribes_on_project_id ON unsubscribes USING btree (project_id);
|
1979
|
+
|
1980
|
+
|
1981
|
+
--
|
1982
|
+
-- Name: index_unsubscribes_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1983
|
+
--
|
1984
|
+
|
1985
|
+
CREATE INDEX index_unsubscribes_on_user_id ON unsubscribes USING btree (user_id);
|
1986
|
+
|
1987
|
+
|
1988
|
+
--
|
1989
|
+
-- Name: index_updates_on_project_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1990
|
+
--
|
1991
|
+
|
1992
|
+
CREATE INDEX index_updates_on_project_id ON updates USING btree (project_id);
|
1993
|
+
|
1994
|
+
|
1995
|
+
--
|
1996
|
+
-- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
1997
|
+
--
|
1998
|
+
|
1999
|
+
CREATE INDEX index_users_on_email ON users USING btree (email);
|
2000
|
+
|
2001
|
+
|
2002
|
+
--
|
2003
|
+
-- Name: index_users_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
2004
|
+
--
|
2005
|
+
|
2006
|
+
CREATE INDEX index_users_on_name ON users USING btree (name);
|
2007
|
+
|
2008
|
+
|
2009
|
+
--
|
2010
|
+
-- Name: index_users_on_reset_password_token; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
2011
|
+
--
|
2012
|
+
|
2013
|
+
CREATE UNIQUE INDEX index_users_on_reset_password_token ON users USING btree (reset_password_token);
|
2014
|
+
|
2015
|
+
|
2016
|
+
--
|
2017
|
+
-- Name: index_versions_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
2018
|
+
--
|
2019
|
+
|
2020
|
+
CREATE INDEX index_versions_on_item_type_and_item_id ON versions USING btree (item_type, item_id);
|
2021
|
+
|
2022
|
+
|
2023
|
+
--
|
2024
|
+
-- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
2025
|
+
--
|
2026
|
+
|
2027
|
+
CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version);
|
2028
|
+
|
2029
|
+
|
2030
|
+
--
|
2031
|
+
-- Name: backers_project_id_reference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2032
|
+
--
|
2033
|
+
|
2034
|
+
ALTER TABLE ONLY backers
|
2035
|
+
ADD CONSTRAINT backers_project_id_reference FOREIGN KEY (project_id) REFERENCES projects(id);
|
2036
|
+
|
2037
|
+
|
2038
|
+
--
|
2039
|
+
-- Name: backers_reward_id_reference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2040
|
+
--
|
2041
|
+
|
2042
|
+
ALTER TABLE ONLY backers
|
2043
|
+
ADD CONSTRAINT backers_reward_id_reference FOREIGN KEY (reward_id) REFERENCES rewards(id);
|
2044
|
+
|
2045
|
+
|
2046
|
+
--
|
2047
|
+
-- Name: backers_user_id_reference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2048
|
+
--
|
2049
|
+
|
2050
|
+
ALTER TABLE ONLY backers
|
2051
|
+
ADD CONSTRAINT backers_user_id_reference FOREIGN KEY (user_id) REFERENCES users(id);
|
2052
|
+
|
2053
|
+
|
2054
|
+
--
|
2055
|
+
-- Name: fk_authorizations_oauth_provider_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2056
|
+
--
|
2057
|
+
|
2058
|
+
ALTER TABLE ONLY authorizations
|
2059
|
+
ADD CONSTRAINT fk_authorizations_oauth_provider_id FOREIGN KEY (oauth_provider_id) REFERENCES oauth_providers(id);
|
2060
|
+
|
2061
|
+
|
2062
|
+
--
|
2063
|
+
-- Name: fk_authorizations_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2064
|
+
--
|
2065
|
+
|
2066
|
+
ALTER TABLE ONLY authorizations
|
2067
|
+
ADD CONSTRAINT fk_authorizations_user_id FOREIGN KEY (user_id) REFERENCES users(id);
|
2068
|
+
|
2069
|
+
|
2070
|
+
--
|
2071
|
+
-- Name: fk_channels_projects_channel_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2072
|
+
--
|
2073
|
+
|
2074
|
+
ALTER TABLE ONLY channels_projects
|
2075
|
+
ADD CONSTRAINT fk_channels_projects_channel_id FOREIGN KEY (channel_id) REFERENCES channels(id);
|
2076
|
+
|
2077
|
+
|
2078
|
+
--
|
2079
|
+
-- Name: fk_channels_projects_project_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2080
|
+
--
|
2081
|
+
|
2082
|
+
ALTER TABLE ONLY channels_projects
|
2083
|
+
ADD CONSTRAINT fk_channels_projects_project_id FOREIGN KEY (project_id) REFERENCES projects(id);
|
2084
|
+
|
2085
|
+
|
2086
|
+
--
|
2087
|
+
-- Name: fk_channels_subscribers_channel_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2088
|
+
--
|
2089
|
+
|
2090
|
+
ALTER TABLE ONLY channels_subscribers
|
2091
|
+
ADD CONSTRAINT fk_channels_subscribers_channel_id FOREIGN KEY (channel_id) REFERENCES channels(id);
|
2092
|
+
|
2093
|
+
|
2094
|
+
--
|
2095
|
+
-- Name: fk_channels_subscribers_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2096
|
+
--
|
2097
|
+
|
2098
|
+
ALTER TABLE ONLY channels_subscribers
|
2099
|
+
ADD CONSTRAINT fk_channels_subscribers_user_id FOREIGN KEY (user_id) REFERENCES users(id);
|
2100
|
+
|
2101
|
+
|
2102
|
+
--
|
2103
|
+
-- Name: fk_channels_trustees_channel_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2104
|
+
--
|
2105
|
+
|
2106
|
+
ALTER TABLE ONLY channels_trustees
|
2107
|
+
ADD CONSTRAINT fk_channels_trustees_channel_id FOREIGN KEY (channel_id) REFERENCES channels(id);
|
2108
|
+
|
2109
|
+
|
2110
|
+
--
|
2111
|
+
-- Name: fk_channels_trustees_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2112
|
+
--
|
2113
|
+
|
2114
|
+
ALTER TABLE ONLY channels_trustees
|
2115
|
+
ADD CONSTRAINT fk_channels_trustees_user_id FOREIGN KEY (user_id) REFERENCES users(id);
|
2116
|
+
|
2117
|
+
|
2118
|
+
--
|
2119
|
+
-- Name: notifications_backer_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2120
|
+
--
|
2121
|
+
|
2122
|
+
ALTER TABLE ONLY notifications
|
2123
|
+
ADD CONSTRAINT notifications_backer_id_fk FOREIGN KEY (backer_id) REFERENCES backers(id);
|
2124
|
+
|
2125
|
+
|
2126
|
+
--
|
2127
|
+
-- Name: notifications_notification_type_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2128
|
+
--
|
2129
|
+
|
2130
|
+
ALTER TABLE ONLY notifications
|
2131
|
+
ADD CONSTRAINT notifications_notification_type_id_fk FOREIGN KEY (notification_type_id) REFERENCES notification_types(id);
|
2132
|
+
|
2133
|
+
|
2134
|
+
--
|
2135
|
+
-- Name: notifications_project_id_reference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2136
|
+
--
|
2137
|
+
|
2138
|
+
ALTER TABLE ONLY notifications
|
2139
|
+
ADD CONSTRAINT notifications_project_id_reference FOREIGN KEY (project_id) REFERENCES projects(id);
|
2140
|
+
|
2141
|
+
|
2142
|
+
--
|
2143
|
+
-- Name: notifications_update_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2144
|
+
--
|
2145
|
+
|
2146
|
+
ALTER TABLE ONLY notifications
|
2147
|
+
ADD CONSTRAINT notifications_update_id_fk FOREIGN KEY (update_id) REFERENCES updates(id);
|
2148
|
+
|
2149
|
+
|
2150
|
+
--
|
2151
|
+
-- Name: notifications_user_id_reference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2152
|
+
--
|
2153
|
+
|
2154
|
+
ALTER TABLE ONLY notifications
|
2155
|
+
ADD CONSTRAINT notifications_user_id_reference FOREIGN KEY (user_id) REFERENCES users(id);
|
2156
|
+
|
2157
|
+
|
2158
|
+
--
|
2159
|
+
-- Name: payment_notifications_backer_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2160
|
+
--
|
2161
|
+
|
2162
|
+
ALTER TABLE ONLY payment_notifications
|
2163
|
+
ADD CONSTRAINT payment_notifications_backer_id_fk FOREIGN KEY (backer_id) REFERENCES backers(id);
|
2164
|
+
|
2165
|
+
|
2166
|
+
--
|
2167
|
+
-- Name: projects_category_id_reference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2168
|
+
--
|
2169
|
+
|
2170
|
+
ALTER TABLE ONLY projects
|
2171
|
+
ADD CONSTRAINT projects_category_id_reference FOREIGN KEY (category_id) REFERENCES categories(id);
|
2172
|
+
|
2173
|
+
|
2174
|
+
--
|
2175
|
+
-- Name: projects_user_id_reference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2176
|
+
--
|
2177
|
+
|
2178
|
+
ALTER TABLE ONLY projects
|
2179
|
+
ADD CONSTRAINT projects_user_id_reference FOREIGN KEY (user_id) REFERENCES users(id);
|
2180
|
+
|
2181
|
+
|
2182
|
+
--
|
2183
|
+
-- Name: rewards_project_id_reference; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2184
|
+
--
|
2185
|
+
|
2186
|
+
ALTER TABLE ONLY rewards
|
2187
|
+
ADD CONSTRAINT rewards_project_id_reference FOREIGN KEY (project_id) REFERENCES projects(id);
|
2188
|
+
|
2189
|
+
|
2190
|
+
--
|
2191
|
+
-- Name: unsubscribes_notification_type_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2192
|
+
--
|
2193
|
+
|
2194
|
+
ALTER TABLE ONLY unsubscribes
|
2195
|
+
ADD CONSTRAINT unsubscribes_notification_type_id_fk FOREIGN KEY (notification_type_id) REFERENCES notification_types(id);
|
2196
|
+
|
2197
|
+
|
2198
|
+
--
|
2199
|
+
-- Name: unsubscribes_project_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2200
|
+
--
|
2201
|
+
|
2202
|
+
ALTER TABLE ONLY unsubscribes
|
2203
|
+
ADD CONSTRAINT unsubscribes_project_id_fk FOREIGN KEY (project_id) REFERENCES projects(id);
|
2204
|
+
|
2205
|
+
|
2206
|
+
--
|
2207
|
+
-- Name: unsubscribes_user_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2208
|
+
--
|
2209
|
+
|
2210
|
+
ALTER TABLE ONLY unsubscribes
|
2211
|
+
ADD CONSTRAINT unsubscribes_user_id_fk FOREIGN KEY (user_id) REFERENCES users(id);
|
2212
|
+
|
2213
|
+
|
2214
|
+
--
|
2215
|
+
-- Name: updates_project_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2216
|
+
--
|
2217
|
+
|
2218
|
+
ALTER TABLE ONLY updates
|
2219
|
+
ADD CONSTRAINT updates_project_id_fk FOREIGN KEY (project_id) REFERENCES projects(id);
|
2220
|
+
|
2221
|
+
|
2222
|
+
--
|
2223
|
+
-- Name: updates_user_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
|
2224
|
+
--
|
2225
|
+
|
2226
|
+
ALTER TABLE ONLY updates
|
2227
|
+
ADD CONSTRAINT updates_user_id_fk FOREIGN KEY (user_id) REFERENCES users(id);
|
2228
|
+
|
2229
|
+
|
2230
|
+
--
|
2231
|
+
-- PostgreSQL database dump complete
|
2232
|
+
--
|
2233
|
+
|
2234
|
+
INSERT INTO schema_migrations (version) VALUES ('20121226120921');
|
2235
|
+
|
2236
|
+
INSERT INTO schema_migrations (version) VALUES ('20121227012003');
|
2237
|
+
|
2238
|
+
INSERT INTO schema_migrations (version) VALUES ('20121227012324');
|
2239
|
+
|
2240
|
+
INSERT INTO schema_migrations (version) VALUES ('20121230111351');
|
2241
|
+
|
2242
|
+
INSERT INTO schema_migrations (version) VALUES ('20130102180139');
|
2243
|
+
|
2244
|
+
INSERT INTO schema_migrations (version) VALUES ('20130104005632');
|
2245
|
+
|
2246
|
+
INSERT INTO schema_migrations (version) VALUES ('20130104104501');
|
2247
|
+
|
2248
|
+
INSERT INTO schema_migrations (version) VALUES ('20130105123546');
|
2249
|
+
|
2250
|
+
INSERT INTO schema_migrations (version) VALUES ('20130110191750');
|
2251
|
+
|
2252
|
+
INSERT INTO schema_migrations (version) VALUES ('20130117205659');
|
2253
|
+
|
2254
|
+
INSERT INTO schema_migrations (version) VALUES ('20130118193907');
|
2255
|
+
|
2256
|
+
INSERT INTO schema_migrations (version) VALUES ('20130121162447');
|
2257
|
+
|
2258
|
+
INSERT INTO schema_migrations (version) VALUES ('20130121204224');
|
2259
|
+
|
2260
|
+
INSERT INTO schema_migrations (version) VALUES ('20130121212325');
|
2261
|
+
|
2262
|
+
INSERT INTO schema_migrations (version) VALUES ('20130131121553');
|
2263
|
+
|
2264
|
+
INSERT INTO schema_migrations (version) VALUES ('20130201200604');
|
2265
|
+
|
2266
|
+
INSERT INTO schema_migrations (version) VALUES ('20130201202648');
|
2267
|
+
|
2268
|
+
INSERT INTO schema_migrations (version) VALUES ('20130201202829');
|
2269
|
+
|
2270
|
+
INSERT INTO schema_migrations (version) VALUES ('20130201205659');
|
2271
|
+
|
2272
|
+
INSERT INTO schema_migrations (version) VALUES ('20130204192704');
|
2273
|
+
|
2274
|
+
INSERT INTO schema_migrations (version) VALUES ('20130205143533');
|
2275
|
+
|
2276
|
+
INSERT INTO schema_migrations (version) VALUES ('20130206121758');
|
2277
|
+
|
2278
|
+
INSERT INTO schema_migrations (version) VALUES ('20130211174609');
|
2279
|
+
|
2280
|
+
INSERT INTO schema_migrations (version) VALUES ('20130212145115');
|
2281
|
+
|
2282
|
+
INSERT INTO schema_migrations (version) VALUES ('20130213184141');
|
2283
|
+
|
2284
|
+
INSERT INTO schema_migrations (version) VALUES ('20130218201312');
|
2285
|
+
|
2286
|
+
INSERT INTO schema_migrations (version) VALUES ('20130218201751');
|
2287
|
+
|
2288
|
+
INSERT INTO schema_migrations (version) VALUES ('20130221171018');
|
2289
|
+
|
2290
|
+
INSERT INTO schema_migrations (version) VALUES ('20130221172840');
|
2291
|
+
|
2292
|
+
INSERT INTO schema_migrations (version) VALUES ('20130221175717');
|
2293
|
+
|
2294
|
+
INSERT INTO schema_migrations (version) VALUES ('20130221184144');
|
2295
|
+
|
2296
|
+
INSERT INTO schema_migrations (version) VALUES ('20130221185532');
|
2297
|
+
|
2298
|
+
INSERT INTO schema_migrations (version) VALUES ('20130221201732');
|
2299
|
+
|
2300
|
+
INSERT INTO schema_migrations (version) VALUES ('20130222163633');
|
2301
|
+
|
2302
|
+
INSERT INTO schema_migrations (version) VALUES ('20130225135512');
|
2303
|
+
|
2304
|
+
INSERT INTO schema_migrations (version) VALUES ('20130225141802');
|
2305
|
+
|
2306
|
+
INSERT INTO schema_migrations (version) VALUES ('20130228141234');
|
2307
|
+
|
2308
|
+
INSERT INTO schema_migrations (version) VALUES ('20130304193806');
|
2309
|
+
|
2310
|
+
INSERT INTO schema_migrations (version) VALUES ('20130307074614');
|
2311
|
+
|
2312
|
+
INSERT INTO schema_migrations (version) VALUES ('20130307090153');
|
2313
|
+
|
2314
|
+
INSERT INTO schema_migrations (version) VALUES ('20130308200907');
|
2315
|
+
|
2316
|
+
INSERT INTO schema_migrations (version) VALUES ('20130311191444');
|
2317
|
+
|
2318
|
+
INSERT INTO schema_migrations (version) VALUES ('20130311192846');
|
2319
|
+
|
2320
|
+
INSERT INTO schema_migrations (version) VALUES ('20130312001021');
|
2321
|
+
|
2322
|
+
INSERT INTO schema_migrations (version) VALUES ('20130313032607');
|
2323
|
+
|
2324
|
+
INSERT INTO schema_migrations (version) VALUES ('20130313034356');
|
2325
|
+
|
2326
|
+
INSERT INTO schema_migrations (version) VALUES ('20130319131919');
|
2327
|
+
|
2328
|
+
INSERT INTO schema_migrations (version) VALUES ('20130410181958');
|
2329
|
+
|
2330
|
+
INSERT INTO schema_migrations (version) VALUES ('20130410190247');
|
2331
|
+
|
2332
|
+
INSERT INTO schema_migrations (version) VALUES ('20130410191240');
|
2333
|
+
|
2334
|
+
INSERT INTO schema_migrations (version) VALUES ('20130411193016');
|
2335
|
+
|
2336
|
+
INSERT INTO schema_migrations (version) VALUES ('20130419184530');
|
2337
|
+
|
2338
|
+
INSERT INTO schema_migrations (version) VALUES ('20130422071805');
|
2339
|
+
|
2340
|
+
INSERT INTO schema_migrations (version) VALUES ('20130422072051');
|
2341
|
+
|
2342
|
+
INSERT INTO schema_migrations (version) VALUES ('20130423162359');
|
2343
|
+
|
2344
|
+
INSERT INTO schema_migrations (version) VALUES ('20130424173128');
|
2345
|
+
|
2346
|
+
INSERT INTO schema_migrations (version) VALUES ('20130426204503');
|
2347
|
+
|
2348
|
+
INSERT INTO schema_migrations (version) VALUES ('20130429142823');
|
2349
|
+
|
2350
|
+
INSERT INTO schema_migrations (version) VALUES ('20130429144749');
|
2351
|
+
|
2352
|
+
INSERT INTO schema_migrations (version) VALUES ('20130429153115');
|
2353
|
+
|
2354
|
+
INSERT INTO schema_migrations (version) VALUES ('20130430203333');
|
2355
|
+
|
2356
|
+
INSERT INTO schema_migrations (version) VALUES ('20130502175814');
|
2357
|
+
|
2358
|
+
INSERT INTO schema_migrations (version) VALUES ('20130505013655');
|
2359
|
+
|
2360
|
+
INSERT INTO schema_migrations (version) VALUES ('20130506191243');
|
2361
|
+
|
2362
|
+
INSERT INTO schema_migrations (version) VALUES ('20130506191508');
|
2363
|
+
|
2364
|
+
INSERT INTO schema_migrations (version) VALUES ('20130514132519');
|
2365
|
+
|
2366
|
+
INSERT INTO schema_migrations (version) VALUES ('20130514185010');
|
2367
|
+
|
2368
|
+
INSERT INTO schema_migrations (version) VALUES ('20130514185116');
|
2369
|
+
|
2370
|
+
INSERT INTO schema_migrations (version) VALUES ('20130514185926');
|
2371
|
+
|
2372
|
+
INSERT INTO schema_migrations (version) VALUES ('20130515192404');
|
2373
|
+
|
2374
|
+
INSERT INTO schema_migrations (version) VALUES ('20130523144013');
|
2375
|
+
|
2376
|
+
INSERT INTO schema_migrations (version) VALUES ('20130523173609');
|
2377
|
+
|
2378
|
+
INSERT INTO schema_migrations (version) VALUES ('20130527204639');
|
2379
|
+
|
2380
|
+
INSERT INTO schema_migrations (version) VALUES ('20130529171845');
|
2381
|
+
|
2382
|
+
INSERT INTO schema_migrations (version) VALUES ('20130604171730');
|
2383
|
+
|
2384
|
+
INSERT INTO schema_migrations (version) VALUES ('20130604172253');
|
2385
|
+
|
2386
|
+
INSERT INTO schema_migrations (version) VALUES ('20130604175953');
|
2387
|
+
|
2388
|
+
INSERT INTO schema_migrations (version) VALUES ('20130604180503');
|
2389
|
+
|
2390
|
+
INSERT INTO schema_migrations (version) VALUES ('20130607222330');
|
2391
|
+
|
2392
|
+
INSERT INTO schema_migrations (version) VALUES ('20130617175402');
|
2393
|
+
|
2394
|
+
INSERT INTO schema_migrations (version) VALUES ('20130618175432');
|
2395
|
+
|
2396
|
+
INSERT INTO schema_migrations (version) VALUES ('20130626122439');
|
2397
|
+
|
2398
|
+
INSERT INTO schema_migrations (version) VALUES ('20130626124055');
|
2399
|
+
|
2400
|
+
INSERT INTO schema_migrations (version) VALUES ('20130702192659');
|
2401
|
+
|
2402
|
+
INSERT INTO schema_migrations (version) VALUES ('20130703171547');
|
2403
|
+
|
2404
|
+
INSERT INTO schema_migrations (version) VALUES ('20130705131825');
|
2405
|
+
|
2406
|
+
INSERT INTO schema_migrations (version) VALUES ('20130705184845');
|
2407
|
+
|
2408
|
+
INSERT INTO schema_migrations (version) VALUES ('20130710122804');
|
2409
|
+
|
2410
|
+
INSERT INTO schema_migrations (version) VALUES ('20130722222945');
|
2411
|
+
|
2412
|
+
INSERT INTO schema_migrations (version) VALUES ('20130730232043');
|
2413
|
+
|
2414
|
+
INSERT INTO schema_migrations (version) VALUES ('20130805230126');
|
2415
|
+
|
2416
|
+
INSERT INTO schema_migrations (version) VALUES ('20130812191450');
|
2417
|
+
|
2418
|
+
INSERT INTO schema_migrations (version) VALUES ('20130814174329');
|
2419
|
+
|
2420
|
+
INSERT INTO schema_migrations (version) VALUES ('20130815161926');
|
2421
|
+
|
2422
|
+
INSERT INTO schema_migrations (version) VALUES ('20130818015857');
|
2423
|
+
|
2424
|
+
INSERT INTO schema_migrations (version) VALUES ('20130822215532');
|
2425
|
+
|
2426
|
+
INSERT INTO schema_migrations (version) VALUES ('20130827210414');
|
2427
|
+
|
2428
|
+
INSERT INTO schema_migrations (version) VALUES ('20130828160026');
|
2429
|
+
|
2430
|
+
INSERT INTO schema_migrations (version) VALUES ('20130829180232');
|
2431
|
+
|
2432
|
+
INSERT INTO schema_migrations (version) VALUES ('20130905153553');
|
2433
|
+
|
2434
|
+
INSERT INTO schema_migrations (version) VALUES ('20130911180657');
|