tosdr / edit.tosdr.org

👍👎 A new web app to rate services
https://edit.tosdr.org
GNU Affero General Public License v3.0
220 stars 37 forks source link

fix six wrong export items #306

Closed michielbdejong closed 6 years ago

michielbdejong commented 6 years ago

the export instructions contain:

# these will be created due to an import bug, see https://github.com/tosdr/phoenix/issues/306
rm src/points/G4iR5KH7WVw-2-amazon.json
rm src/points/G4iR5KH7WVw-amazon.json
rm src/points/T98obrJsjJA-2-amazon.json
rm src/points/T98obrJsjJA-2-gravatar.json
rm src/points/legal-name-registration-amazon.json
rm src/points/pseudos-allowed-amazon.json

This is the ticket for fixing that :)

michielbdejong commented 6 years ago

the list changed to:


# these will be created due to an import bug, see https://github.com/tosdr/phoenix/issues/306
rm src/points/G4iR5KH7WVw-2.json
rm src/points/G4iR5KH7WVw.json
rm src/points/T98obrJsjJA-2.json
rm src/points/legal-name-registration.json
rm src/points/pseudos-allowed.json
michielbdejong commented 6 years ago
edit-tosdr-org::DATABASE=> select * from "points" where "oldId"='pseudos-allowed';
 id  | user_id | rank |       title        |                             source                             |  status  |                                                                 analysis                                                                 | rating | is_featured |         created_at         |         updated_at         | topic_id | service_id | quote | case_id |      oldId      | point_change
-----+---------+------+--------------------+----------------------------------------------------------------+----------+------------------------------------------------------------------------------------------------------------------------------------------+--------+-------------+----------------------------+----------------------------+----------+------------+-------+---------+-----------------+--------------
 976 |       3 |    0 | Pseudonyms allowed | https://groups.google.com/d/topic/tosdr/Q1oDK4mAvuw/discussion | declined | You do not have to provide your legal name (except for paid accounts for billing purposes) and you can use the service with a pseudonym. |      2 | f           | 2018-01-16 15:28:12.118123 | 2018-03-05 09:19:53.273447 |       41 |        190 |       |     215 | pseudos-allowed |
 974 |       3 |    0 | Pseudonyms allowed | https://groups.google.com/d/topic/tosdr/Q1oDK4mAvuw/discussion | approved | You do not have to provide your legal name (except for paid accounts for billing purposes) and you can use the service with a pseudonym. |      2 | f           | 2018-01-16 15:28:12.058689 | 2018-01-16 15:28:12.058689 |       41 |        282 |       |     215 | pseudos-allowed |
 975 |       3 |    0 | Pseudonyms allowed | https://groups.google.com/d/topic/tosdr/Q1oDK4mAvuw/discussion | approved | You do not have to provide your legal name (except for paid accounts for billing purposes) and you can use the service with a pseudonym. |      2 | f           | 2018-01-16 15:28:12.085668 | 2018-01-16 15:28:12.085668 |       41 |        276 |       |     215 | pseudos-allowed |
 977 |       3 |    0 | Pseudonyms allowed | https://groups.google.com/d/topic/tosdr/Q1oDK4mAvuw/discussion | approved | You do not have to provide your legal name (except for paid accounts for billing purposes) and you can use the service with a pseudonym. |      2 | f           | 2018-01-16 15:28:12.160105 | 2018-01-16 15:28:12.160105 |       41 |        180 |       |     215 | pseudos-allowed |
(4 rows)
edit-tosdr-org::DATABASE=> select "name","id" from services where "id" in (190, 282, 276, 180);
    name    | id
------------+-----
 Steam      | 180
 Amazon     | 190
 500px      | 282
 SoundCloud | 276
(4 rows)
edit-tosdr-org::DATABASE=> update points set "oldId"='pseudos-allowed-steam' where "id"=977;
UPDATE 1
edit-tosdr-org::DATABASE=> update points set "oldId"='pseudos-allowed-soundcloud' where "id"=975;
UPDATE 1
edit-tosdr-org::DATABASE=> update points set "oldId"='pseudos-allowed-500px' where "id"=974;
UPDATE 1
edit-tosdr-org::DATABASE=> update points set "oldId"='pseudos-allowed-app-net' where "id"=976;
UPDATE 1
michielbdejong commented 6 years ago

Same for legal-name-registration, and updated amazon->app.net and amazon->yahoo. Now:

edit-tosdr-org::DATABASE=> select "name","id" from services where "id" in (select distinct "service_id" from points where "oldId"='T98obrJsjJA-2');
    name    | id
------------+-----
 phpBB      | 169
 RapidShare | 205
 vBulletin  | 215
 Skype      | 204
 RuneScape  | 199
 Amazon     | 190
 Hypster    | 283
 eBuddy     | 305
 Wordfeud   | 294
 BearShare  | 254
 Zoosk      | 266
 Habbo      | 292
 Gravatar   | 156
 Evernote   | 207
(14 rows)
michielbdejong commented 6 years ago

id | service_id ------+------------ 1069 | 199 runescape 1061 | 204 skype 1062 | 266 zoosk 1063 | 305 ebuddy 1064 | 292 habbo 1065 | 207 evernote 1066 | 215 vbulletin 1067 | 205 rapidshare 1070 | 254 bearshare 1071 | 294 wordfeud 1073 | 169 phpbb 1068 | 156 ~gravatar~ <---- changing this one to world-of-warcraft, looks like import error. 1072 | 190 bit-ly 1074 | 190 videobb 1077 | 283 hypster 1075 | 190 wordpress-com 1076 | 190 olx 1078 | 190 xfire (18 rows)

michielbdejong commented 6 years ago

../src/points/G4iR5KH7WVw-2-apple.json 584 ../src/points/G4iR5KH7WVw-2-at-t.json -> 590 ../src/points/G4iR5KH7WVw-2-comcast.json 586 ../src/points/G4iR5KH7WVw-2-delicious.json 587 ../src/points/G4iR5KH7WVw-2-duckduckgo.json 558 ../src/points/G4iR5KH7WVw-2-facebook.json 589 ../src/points/G4iR5KH7WVw-2-identi-ca.json -> 592 ../src/points/G4iR5KH7WVw-2-linkedin.json 591 ../src/points/G4iR5KH7WVw-2-microsoft.json -> 595 ../src/points/G4iR5KH7WVw-2-myspace.json 593 ../src/points/G4iR5KH7WVw-2-openstreetmap.json 594 ../src/points/G4iR5KH7WVw-2-seenthis.json -> 597 ../src/points/G4iR5KH7WVw-2-skype.json 596 ../src/points/G4iR5KH7WVw-2-sonic-net.json -> 598 ../src/points/G4iR5KH7WVw-2-verizon.json -> 600 ../src/points/G4iR5KH7WVw-2-wikipedia.json 599 ../src/points/G4iR5KH7WVw-2-wordpress-com.json -> 601 ../src/points/G4iR5KH7WVw-2-yahoo.json -> 585

edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-duckduckgo' where "id"=588; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-comcast' where "id"=586; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-apple' where "id"=584; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-skype' where "id"=596; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-myspace' where "id"=593; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-linkedin' where "id"=591; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-facebook' where "id"=589; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-openstreetmap' where "id"=594; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-wikipedia' where "id"=599; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-delicious' where "id"=587; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-at-t', "service_id=181 where "id"=590; edit-tosdr-org::DATABASE"> edit-tosdr-org::DATABASE"> ^C edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-at-t', "service_id"=181 where "id"=590; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-identi-ca', "service_id"=174 where "id"=592; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-microsoft', "service_id"=244 where "id"=595; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-seenthis', "service_id"=330 where "id"=597; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-sonic-net, "service_id"=286 where "id"=598; edit-tosdr-org::DATABASE'> ^C edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-sonic-net", "service_id"=286 where "id"=598; edit-tosdr-org::DATABASE'> ^C edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-sonic-net', "service_id"=286 where "id"=598; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-verizon', "service_id"=416 where "id"=600; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-wordpress-com', "service_id"=173 where "id"=601; UPDATE 1 edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-2-yahoo', "service_id"=309 where "id"=585; UPDATE 1 edit-tosdr-org::DATABASE=>

michielbdejong commented 6 years ago

edit-tosdr-org::DATABASE=> select "id", "service_id" from "points" where "oldId"='G4iR5KH7WVw';
 id  | service_id
-----+------------
 813 |        230
 812 |        217
 811 |        190
 808 |        270
 809 |        278
 810 |        251
 807 |        190
 814 |        267
 815 |        195
(9 rows)

edit-tosdr-org::DATABASE=> select "name","id" from services where "id" in (select distinct "service_id" from points where "oldId"='G4iR5KH7WVw');
    name    | id
------------+-----
 twitter    | 195
 PayPal     | 230
 Amazon     | 190
 Dropbox    | 270
 Foursquare | 251
 Flattr     | 278
 SpiderOak  | 267
 Google     | 217
(8 rows)

edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-twitter' where "id"=815;
UPDATE 1
edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-paypal' where "id"=813;
UPDATE 1
edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-dropbox' where "id"=808;
UPDATE 1
edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-foursquare' where "id"=810;
UPDATE 1
edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-flattr' where "id"=809;
UPDATE 1
edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-spideroak' where "id"=814;
UPDATE 1
edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-google' where "id"=812;
UPDATE 1
edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-joindiaspora-com', "service_id"=231 where "id"=811;
UPDATE 1
edit-tosdr-org::DATABASE=> update points set "oldId"='G4iR5KH7WVw-loopt', "service_id"=437 where "id"=807;
UPDATE 1
edit-tosdr-org::DATABASE=>
michielbdejong commented 6 years ago

Correction:

update points set "oldId"='T98obrJsjJA-2-world-of-warcraft', "service_id"=397 where "id"=1068;
update points set "oldId"='T98obrJsjJA-2-wordpress-com', "service_id"=173 where "id"=1075;
update points set "oldId"='T98obrJsjJA-2-xfire', "service_id"=343 where "id"=1078;
update points set "oldId"='T98obrJsjJA-2-videobb', "service_id"=342 where "id"=1074;
update points set "oldId"='T98obrJsjJA-2-olx', "service_id"=341 where "id"=1076;
update points set "oldId"='T98obrJsjJA-2-bit-ly', "service_id"=224 where "id"=1072;
update points set "oldId"='T98obrJsjJA-2-hypster' where "id"=1077;
update points set "oldId"='T98obrJsjJA-2-phpbb' where "id"=1073;
update points set "oldId"='T98obrJsjJA-2-wordfeud' where "id"=1071;
update points set "oldId"='T98obrJsjJA-2-bearshare' where "id"=1070;
update points set "oldId"='T98obrJsjJA-2-rapidshare' where "id"=1067;
update points set "oldId"='T98obrJsjJA-2-vbulletin' where "id"=1066;
update points set "oldId"='T98obrJsjJA-2-evernote' where "id"=1065;
update points set "oldId"='T98obrJsjJA-2-habbo' where "id"=1064;
update points set "oldId"='T98obrJsjJA-2-ebuddy' where "id"=1063;
update points set "oldId"='T98obrJsjJA-2-zoosk' where "id"=1062;
update points set "oldId"='T98obrJsjJA-2-skype' where "id"=1061;
update points set "oldId"='T98obrJsjJA-2-runescape' where "id"=1069;