Commit graph

376 commits

Author SHA1 Message Date
rhymes
6298715612
[deploy] Add unique index on articles slug user_id (#10126) 2020-09-01 18:35:03 +02:00
Ben Halpern
dba151915b
[deploy] Allow initial user to sign up and configure app (#10073)
* Allow initial user to sign up and configure app

* Fix added value unneeded

* Make siteconfig public in tests

* Remove deprecated method and adjust seed default

* Add new controllers not to redirect for public

* Modify tests

* Edit test defaults

* Fix linting

* Add starter mode to seed file
2020-08-31 12:54:22 -04:00
Michael Kohl
ce9ed24090
[deploy] Remove group column from profile_fields (#10046) 2020-08-31 10:18:13 -04:00
rhymes
1a147a3176
[deploy] Add missing foreign keys to models related to users (#10018)
* Add missing foreign keys to models related to users

* Fix specs

* Change FK for page_views and rating_votes to nullify

* Improve rating vote validation and fix Users::Delete specs

* Revert "Spec Fix:Nullify Rating Votes when Deleting Users (#10071)"

This reverts commit 12dfe4ab3b.
2020-08-31 15:39:57 +02:00
rhymes
83c2e1427c
[deploy] Add foreign keys between buffer_updates, rating_votes and articles (#10016)
* Add foreign keys between buffer_updates, rating_votes and articles

* Trigger Travis CI
2020-08-29 00:00:28 +02:00
Michael Kohl
6c2357af48
Fix seeds.rb (#10047) 2020-08-28 14:34:43 +02:00
Michael Kohl
161ed7d55e
[deploy] Introduce ProfileFieldGroup model (#10007)
* Introduce ProfileFieldGroup model

* Make profile_fields_groups name column unique

* Fix some specs

* feat: allow the page to work again

* Add guard clause to data update script

* Remove unused file

* Fix specs

* Add foreign key

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2020-08-28 10:51:33 +07:00
rhymes
56f1f2d777
[deploy] Set UserSubscription sourceable columns to nullable (#10033)
* Set UserSubscription sourceable columns to nullable

* Fix spec
2020-08-27 16:25:48 +02:00
Josh Puetz
d47d02f090
[deploy] Log in with Facebook (#9922)
* First draft of facebook auth

* Add Facebook welcome broadcast to seeds, data script

* Tests!

* Documentation

* Update docs with pictures

* User siteconfig/app config

* Adjust dropdown menu width to avoid wrap for Facebook button

* Add Facebook auth keys to SiteConfig properly

* Remove unnecessary VCR cassette

* Add omniauth facebook gem to vendor cache

* Use uid instead of email for nickname randomization

* Test fix, test for missing email in Facebook

* Update docs/backend/auth-facebook.md

Co-authored-by: Molly Struve <mollylbs@gmail.com>

* Typo fix!

* Don't default facebook auth settings to ApplicationConfig

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-08-26 12:04:20 -04:00
rhymes
36358293ce
[deploy] Add foreign keys to models related to Organization (#9933)
* Add foreign keys to models related to Organization

* Fix specs

* Use on_delete: :cascade for listings -> organizations FK
2020-08-25 20:20:47 +02:00
Michael Kohl
1f66056f28
[deploy] Stop using ProfileField#active Part 2 (#9911)
* Remove ProfileField#active

* Add schema.rb
2020-08-24 13:13:51 +07:00
Emma Goto
34e5b68182
[deploy] Add ability to turn off reaction notifications in notification settings (#9435)
* Add ability to turn off reaction notifications in notification settings

* Rename article_reaction_notifications to react-Notifications

* Rename platform notification settings to general notification settings and add reactions toggle

* Fix new_reaction_worker_spec

Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-08-23 16:54:36 +02:00
Michael Kohl
b318b0a139
Add display columns to ProfileField (#9886)
Co-authored-by: rhymes <rhymes@hey.com>
2020-08-21 10:25:54 +07:00
rhymes
24b65c0c27
[deploy] Add relations and foreign keys between Podcast related models (#9888)
* Add proper relations and dependent clauses

* Add foreign key between podcast_episodes and podcasts
2020-08-20 16:53:53 +02:00
rhymes
99615705ca
[deploy] Add relations and foreign keys between Poll related models (#9854) 2020-08-20 11:14:54 +02:00
Raphael Noriode
30b3592488
[deploy] Listing endorsements: models setup (#9841)
* create listing endorsement model and write test to validate it

* create the classified_listing_endorsements table

* create model associations with seed data and test validations

* modify test and create more seed date for endorsement

* modify the model naming, changed seed data to become radomized and updated the test file

* remove unnecessary function
2020-08-20 11:13:44 +02:00
Michael Kohl
eff28766fc
[deploy] Migrate profile data (#9750)
* Add temporary Rake task for creating profile fields

* Fix problems after splitting branch

* Add profile migration Rake task

* Add unique index to profiles

* Add migration code to users

* Be smarter about updating profiles

* Update spec

* Update Bullet config

* Fix typo

* Change temporary rake task to data update script

* Re-add profile factory and update spec

* Change private declaration to make CodeClimate happy

* Update comment

* Drop validation in favor of DB default

* Update spec
2020-08-20 11:17:57 +07:00
Ben Halpern
6c71369df5
[deploy] Add community_name to site config (#9864)
* Add community_name to site config

* Fix a spec

* Remove SiteConfig from constants

* Change subjects to method

* Fix subjects method

* Fix linting
2020-08-19 14:54:40 -04:00
rhymes
a86f4c83f2
[deploy] Add relations and foreign keys between HtmlVariant related models (#9846)
* Add inverse has_many relation betwen User and Ahoy::[Event|Visit
]

* Add FKs and proper relations to HtmlVariant models
2020-08-18 11:33:38 -04:00
rhymes
7c82487842
[deploy] Add missing foreign keys to DisplayAdEvent (#9786) 2020-08-17 16:46:40 +02:00
Michael Kohl
2b3242087c
[deploy] Start using profile model (#9724)
* Persist attribute_name for profile fields

* Update fields

* Add temporary Rake task for creating profile fields

* Update specs

* Fix problems after splitting branch
2020-08-17 09:57:50 +07:00
Molly Struve
b9d7202ec0
[deploy] Optimization:Migrate Final Small Table PKs to Bigints (#9706) 2020-08-11 15:51:54 -05:00
rhymes
d337f5ee41
[deploy] Add foreign keys to Ahoy models (#9636)
* Add foreign keys to Ahoy models

* Empty incorrect script

* Delete with SQL

* Moved cleanup script in #9710

* Trigger Travis correctly
2020-08-11 20:46:17 +02:00
Michael Kohl
2555de8a5f
Add profile model (#9648)
* Create profiles table

* Add store_attribute gem

* Add profile model

* Add default value to data column

* Add and update factories

* Add cascading delete

* Make field non-nullable

* Add specs

* Fix cascading delete for profiles
2020-08-11 10:15:22 +07:00
Molly Struve
b3d7f76dd0
[deploy] Optimization: Change Large Table Primary Keys to Bigints (#9476) 2020-08-08 18:45:01 -05:00
Molly Struve
04fea52893
[deploy] Update Users, Follows, Identities, and Reaction Pks to Bigints (#9615) 2020-08-06 18:27:08 -05:00
Michael Kohl
c2d23cfc4d
[deploy] Seed profile fields (#9605)
* Fix schema.rb

* Add service objects for base and link fields

* Add link fields to seeds

* Make placeholder a keyword argument

* Add work fields

* Add explanation column to profile fields

* Add coding fields

* Switch from inheritance to mixin

* Add email checkbox to base fields

* Add branding fields

* Add spec for ProfileFields::FieldDefinition

* Move migration back into correct location

* Rename column from explanation to description

* Rename attribute in mixin

* chore: rename from explanation to description

* Add ProfileFields::ImportFromCsv

* Simplify ProfileFields::ImportFromCsv

* Add comment about disabled cop to spec

* Add TODO comment to Rake task

* Document mixin

* Add groups to profile fields

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2020-08-05 10:11:30 -04:00
Michael Kohl
e9bbcbb789
[deploy] Add ProfileField model (#9580)
* Add ProfileField model

* Fix schema.rb

* Fix schema.rb again

* Fix validation
2020-08-03 16:16:50 -04:00
Michael Kohl
6edb476acd
[deploy] Remove UserOptionalField (#9579)
* Remove UserOptionalField

* Remove optional fields from user and users factory

* Remove optional fields from user spec
2020-07-31 09:59:48 -04:00
Michael Kohl
1a6c6acd45
[deploy] Activate Devise::Lockable (#9535) 2020-07-30 10:28:51 -04:00
rhymes
5a2cae4fbb
Rubocop: enable and fix new Rails cops (#9537)
* Enable new Rails/* cops and use autocorrect on them

* Fixed Rails/PluckInWhere leftovers

* Fix Rails/DefaultScope

* Enable and fix Rails/PluckId

* Fix manual mistake with forcing autocorrection on Rails/PluckId

* Apply PR feedback to remove Rails/PluckId inline disables

* Apply PR feedback to get rid of Rails/PluckInWhere inline
2020-07-29 11:14:19 +02:00
Molly Struve
7460893159
[deploy] Optimization:Change Comment, Ad Events, and Github ID Code Ints to Bigints (#9543) 2020-07-28 14:35:03 -05:00
Molly Struve
97882ce31c
[deploy] Optimization:Change Tag Related IDs to Bigints (#9533) 2020-07-27 10:51:56 -05:00
Michael Kohl
f0c4197aab
Update seeds.rb with password confirmation (#9536) 2020-07-27 15:47:42 +02:00
Molly Struve
4f20555221
[deploy] Optimization:Change Multiple Small Table Column IDs to Bigints (#9513) 2020-07-26 16:16:13 -05:00
Molly Struve
21b1afb076
[deploy] Optimization:Change Mentions, Notes, Podcasts, Roles Related Ids To Bigints (#9477) 2020-07-25 16:11:26 -05:00
Molly Struve
06fb3cff6b
[deploy] Optimization:Recreate Comments Index with Digest Hash (#9474) 2020-07-25 14:32:00 -05:00
Molly Struve
b6cc3ebb9a
[deploy] Optimization:Change Podcast and Episode PKs to Bigints (#9423) 2020-07-22 09:15:10 -05:00
Molly Struve
d79a2133f7
[deploy] Optimization:Change Tweet Primary Key to Bigint (#9409) 2020-07-21 08:08:52 -05:00
Molly Struve
c99cd29eb2
[deploy] Optimization:Change Role PKs from Int to Bigint (#9403) 2020-07-20 12:26:55 -05:00
Molly Struve
d9beec9419
[deploy] Optimization:Change Primary Keys on Mentions and Notes to Bigint (#9393) 2020-07-20 09:04:18 -05:00
Molly Struve
914e8b80a8
[deploy] Optimization:Change Broadcast and GithubIssue PKs to Bigint (#9372) 2020-07-19 17:41:37 -05:00
Molly Struve
129b60772c
[deploy] Refactor:Drop Blocks Table (#9373) 2020-07-17 16:29:05 -05:00
rhymes
995f9f8679
Create Listings in seed file (#9351) 2020-07-16 12:08:11 -04:00
Alex
204fb51f14
[deploy] Remove path redirects (#9350)
* Remove path_redirect menu item

* Remove path_redirects_controller

* Remove path_redirect routes

* Remove PathRedirect model

* Remove internal views

* Remove path_redirects from seed file

* Remove PathRedirect factory

* Remove specs

* Migration to drop table and update schema
2020-07-16 09:35:42 -04:00
Ben Halpern
da6a6739e5
[deploy] Invite users to join and create password (#9294)
* Initial invitation work

* Add more invitation code

* Add proper registration page

* Fix up tests

* Fix failings

* Fix spec

* Add self-serve auth config

* Add registered condition

* Change profile image call and registered_at test

* Change comment

* Fix copy test

* Stub emojipedia

* Linting

* Add registered at to factory

* Ensure registered for user tag

* Update app/views/internal/invitations/index.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/controllers/internal/invitations_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Slight changes

* Update recover password flow

* Update app/views/internal/invitations/index.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/controllers/internal/invitations_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update db/schema.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-07-15 11:37:19 -04:00
Julianna Tetreault
5f143c4308
Add Polymorphism to Broadcasts (Part 1) (#9231) [deploy]
* Add polymorphism to Broadcasts table
  - Adds a broadcastable_id column to Broadcasts
  - Adds a broadcastable_type column to Broadcasts

* Create Announcements and Welcome Notifications tables
  - Adds an Announcements table
  - Adds a Welcome Notifications table
  - Adds timestamps to both tables
  - Adds banner_style column to Announcements table

* Adds Announcement and Welcome Notification models
  - Adds an Announcement model in prep for polymorphism
  - Adds a WelcomeNotification model in prep for polymorphism

* Add data_update script to backfill type_of column for Broadcasts

* Add unique index on broadcastable_type and broadcastable_id on the Broadcasts table

* Add update! to the data_update script to backfill broadcastable_type
2020-07-13 09:36:19 -06:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
Alex
9f9236164c
[deploy] Add subscriptions to the dashboard (#9161)
* Add /dashboard/subscriptions route

* Dashboard controller updates

* Update ArticlePolicy with subscriptions?

* Update article row view in dashboard

* Add subscriptions view

* Add specs

* Add comment for pagination limit

* Use cached user_subscriptions count

* Add spec for cache counter

* Add path helper
2020-07-08 08:31:03 -04:00
rhymes
8afc9bb0c3
[deploy] Add unique indexes to follows - part 7 (#8215) 2020-07-06 11:15:56 -05:00