Commit Graph

360 Commits

Author SHA1 Message Date
evazion
c6764c670f Drop advertisement tables. 2019-08-27 18:45:40 -05:00
evazion
bce1e2b545 delayed jobs: add indices in db. 2019-08-27 18:13:30 -05:00
evazion
09f4ff7de1 Update db/structure.sql. 2019-08-27 18:13:30 -05:00
evazion
3f86a60457 Upgrade to Rails 6.0.0. 2019-08-27 18:13:30 -05:00
evazion
0df5c0fd2b Replace deprecated update_attributes with update.
https://rubyinrails.com/2019/04/09/rails-6-1-activerecord-deprecates-update-attributes-methods/

DEPRECATION WARNING: update_attributes! is deprecated and will be removed from Rails 6.1 (please, use update! instead)
2019-08-25 20:29:32 -05:00
evazion
82fbb19e0f users: drop unused code. 2019-08-18 11:24:42 -05:00
evazion
27a118dfc8 tests: drop timecop gem. 2019-08-18 11:24:41 -05:00
evazion
b0da649b09 Remove obsolete scripts.
These are mostly old files mostly related to maintenance of Danbooru 1
or the upgrade to Danbooru 2.
2019-08-06 10:42:45 -05:00
Albert Yi
500438ef14 add dmail indices 2019-07-12 10:48:48 -07:00
Albert Yi
a15b13567d db structure update 2019-01-28 17:28:11 -08:00
Albert Yi
caf60d690d better check for forum post votability 2019-01-28 17:23:33 -08:00
evazion
80f43f9a7c Fix #4038: Attempting to create an IP-ban bans the creator.
* Rename comments.ip_addr to comments.creator_ip_addr.
* Fix belongs_to_creator to not clobber ip_addr field.
2019-01-09 16:20:34 -06:00
Albert Yi
79dfa6c28f fix migration for circleci 2018-12-10 17:51:57 -08:00
evazion
28f32abe24 Fix migrations. 2018-12-10 19:38:56 -06:00
evazion
f00641b3ac Fix #3998: Some artist histories throw exceptions. 2018-12-02 11:45:57 -06:00
Albert Yi
fe612908cd add creator_ip_addr field to user feedback 2018-11-29 16:51:46 -08:00
Albert Yi
0488a326fd more migration fuckery 2018-11-28 13:55:02 -08:00
Albert Yi
4c151cece4 update migration 2018-11-28 13:37:39 -08:00
Albert Yi
2cc86877b1 update migrations 2018-11-28 13:30:35 -08:00
Albert Yi
60cee5f452 Merge pull request #3989 from evazion/fix-3987
Wiki pages: convert other_names column to array (#3987)
2018-11-19 16:23:32 -08:00
evazion
41ff05c121 artists: convert other_names to array (#3987). 2018-11-15 14:31:16 -06:00
Albert Yi
0508b127fd continue refactoring savedsearch 2018-11-15 12:06:13 -08:00
evazion
741462ae68 artist versions: convert other_names, url_string to arrays (#3987). 2018-11-14 14:25:02 -06:00
evazion
fe2698a011 tag implications: convert descendant_names to array (#3987). 2018-11-14 12:51:18 -06:00
evazion
308a5021b4 wiki pages: convert other_names to array (#3987). 2018-11-13 19:18:11 -06:00
Albert Yi
0747284124 add without_timeout blocks on migrations 2018-11-08 14:24:45 -08:00
evazion
fb7d83c54f pools: drop post_count column (fix #3667) 2018-11-08 15:35:41 -06:00
evazion
115ed16a96 pools: store post_ids as array instead of string (fix #3979) 2018-11-08 15:09:31 -06:00
r888888888
192ac128cd add additional meta tags for seo 2018-10-20 17:15:29 -07:00
Albert Yi
5958b3f5da disable statement timeout in migration 2018-09-17 13:23:10 -07:00
evazion
4a84ec9e26 artist urls: add trigram indexes on urls. 2018-09-15 19:58:55 -05:00
Albert Yi
4b75ccf89f fix index on tag name prefixes (#3858) 2018-09-13 11:44:11 -07:00
Albert Yi
7c6ef9f22c Revert "Revert "add prefix index on tags (#3858)""
This reverts commit 6210c1554c.
2018-09-13 11:44:07 -07:00
Albert Yi
6210c1554c Revert "add prefix index on tags (#3858)"
This reverts commit 8c564f055f.
2018-09-12 16:41:52 -07:00
Albert Yi
c100600875 fix migration 2018-09-12 15:19:27 -07:00
Albert Yi
a4674e1ffe disable statement timeout on migration 2018-09-12 15:10:52 -07:00
Albert Yi
8c564f055f add prefix index on tags (#3858) 2018-09-12 14:01:21 -07:00
Albert Yi
68c30961ac Merge pull request #3805 from r888888888/refactor-sources
Refactor sources
2018-08-28 12:13:15 -07:00
evazion
6ff70c5002 mod actions: separate account upgrades from promotions (fix #3841) 2018-08-26 11:12:04 -05:00
Albert Yi
762dc3da24 Refactor sources 2018-08-24 12:10:51 -07:00
r888888888
334d8b7c6f Add alt_source field on uploads to deal with twitter galleries 2018-08-04 16:32:15 -07:00
Albert Yi
a610111658 switch post previews to use flexbox, add better styling for cropped thumbnails 2018-07-18 11:38:00 -07:00
Albert Yi
64446d49e1 add image cropping support 2018-06-22 14:41:57 -07:00
Albert Yi
fdd7582fb0 add support for upload preprocessing 2018-06-14 17:52:41 -07:00
Albert Yi
fcd80b6043 Artist urls can be prepended with a '-' to mark is inactive (#3388) 2018-05-16 16:04:05 -07:00
Albert Yi
f2b525a6d2 Implement forum topic voting and tag change pruning (#3580) 2018-04-26 15:31:06 -07:00
Albert Yi
b0a3f574ed fixes #3574 2018-04-25 14:31:11 -07:00
Albert Yi
9957c4c0e2 fixes #3644 2018-04-16 16:43:51 -07:00
r888888888
abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00
Albert Yi
e006380567 change reason field on flags and appeals to text 2018-04-03 16:14:42 -07:00