Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r17403: LJSUP-6780 (Twitter Digest): change the ...

Committer: ailyin
LJSUP-6780 (Twitter Digest): change the way ratelist is stored in SVN; no functional changes just yet
U   trunk/bin/upgrading/base-data.sql
U   trunk/bin/upgrading/proplists.dat
U   trunk/bin/upgrading/update-db.pl
Modified: trunk/bin/upgrading/base-data.sql
===================================================================
--- trunk/bin/upgrading/base-data.sql	2010-09-17 07:32:07 UTC (rev 17402)
+++ trunk/bin/upgrading/base-data.sql	2010-09-17 11:05:34 UTC (rev 17403)
@@ -590,32 +590,6 @@
 UPDATE priv_list SET des='Allows a user to edit site text in a given language. arg=Unique language code, optionally appended by |domainid.domaincode',is_public='1',privname='Translate/Update Text',scope='general' WHERE privcode='translate';
 INSERT IGNORE INTO priv_list (des, is_public, privcode, privname, scope) VALUES ('Allows a user to add and remove entries from a vertical. arg=The vertical name, or \"*\" for all verticals', '0', 'vertical', 'Moderate Vertical', 'general');
 UPDATE priv_list SET des='Allows a user to add and remove entries from a vertical. arg=The vertical name, or \"*\" for all verticals',is_public='0',privname='Moderate Vertical',scope='general' WHERE privcode='vertical';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged when a user adds someone to their Friends list', 'addfriend');
-UPDATE ratelist SET des='Logged when a user adds someone to their Friends list' WHERE name='addfriend';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged when a community\'s entry gets added to a vertical', 'comm_in_vertical');
-UPDATE ratelist SET des='Logged when a community\'s entry gets added to a vertical' WHERE name='comm_in_vertical';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged when user flags content', 'ctflag');
-UPDATE ratelist SET des='Logged when user flags content' WHERE name='ctflag';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged when wrong username/password is used.', 'failed_login');
-UPDATE ratelist SET des='Logged when wrong username/password is used.' WHERE name='failed_login';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged when a user sends a free VGift', 'freevgifts');
-UPDATE ratelist SET des='Logged when a user sends a free VGift' WHERE name='freevgifts';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged when a journal\'s entry gets added to a vertical', 'in_vertical');
-UPDATE ratelist SET des='Logged when a journal\'s entry gets added to a vertical' WHERE name='in_vertical';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged when a user sends a friend invite', 'invitefriend');
-UPDATE ratelist SET des='Logged when a user sends a friend invite' WHERE name='invitefriend';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged when a forgotten password or username e-mail is requested', 'lostinfo');
-UPDATE ratelist SET des='Logged when a forgotten password or username e-mail is requested' WHERE name='lostinfo';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged whenever user posts (to any journal)', 'post');
-UPDATE ratelist SET des='Logged whenever user posts (to any journal)' WHERE name='post';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged when a user registers a number for SMS', 'sms_register');
-UPDATE ratelist SET des='Logged when a user registers a number for SMS' WHERE name='sms_register';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged when a syndicated account\'s entry gets added to a vertical', 'syn_in_vertical');
-UPDATE ratelist SET des='Logged when a syndicated account\'s entry gets added to a vertical' WHERE name='syn_in_vertical';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged when a users sends a message via Tell A Friend', 'tellafriend');
-UPDATE ratelist SET des='Logged when a users sends a message via Tell A Friend' WHERE name='tellafriend';
-INSERT IGNORE INTO ratelist (des, name) VALUES ('Logged when a users sends a message to another user', 'usermessage');
-UPDATE ratelist SET des='Logged when a users sends a message to another user' WHERE name='usermessage';
 REPLACE INTO schemacols (colname, des, tablename) VALUES ('FIPS', 'U.S. Census Bureau assigned two-digit FIPS (Federal Information Processing Standards) code for geographic sequence of each State within each census division.', 'zips');
 REPLACE INTO schemacols (colname, des, tablename) VALUES ('Name', 'Name of city.', 'zips');
 REPLACE INTO schemacols (colname, des, tablename) VALUES ('State', 'State.', 'zips');
@@ -987,7 +961,7 @@
 REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Global. Stores the debug logging of LJ::NotificationMethod::DebugLog, when that\'s used to replace an officialpost notification method (such as Inbox or Email).', '0', 'off', NULL, 'debug_notifymethod');
 REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Global. Stores the different S1 style system color schemes.', '1', 'replace', NULL, 'themelist');
 REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Global. Stores the different interests listed, and the number of users listing each interest. Please see also [dbtable[comminterests]].', '0', 'off', NULL, 'interests');
-REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Global. Stores the different rate-limited actions a user can make.\n\r\nUsed for rate-limiting infrastructure: denying fast failed logins (password brute-forcing), user-to-user messaging, rate-limiting on friend additions, etc.', '1', 'replace', NULL, 'ratelist');
+REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Global. Stores the different rate-limited actions a user can make.\n\r\nUsed for rate-limiting infrastructure: denying fast failed logins (password brute-forcing), user-to-user messaging, rate-limiting on friend additions, etc.', '1', 'off', NULL, 'ratelist');
 REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Global. Stores the results of a Directory Search query.', '0', 'off', NULL, 'dirsearchres2');
 REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Global. Stores the special links (\"reluser relationships\") between accounts, such as community maintainers/moderators.\n\r\nA relationship \"type\" is a single character. Please see also [dbtable[reluser2]].', '0', 'off', NULL, 'reluser');
 REPLACE INTO schematables (des, public_browsable, redist_mode, redist_where, tablename) VALUES ('Global. Stores user S1 style system override customizations. Please see also the clustered [dbtable[s1overrides]] table.', '0', 'off', NULL, 'overrides');

Modified: trunk/bin/upgrading/proplists.dat
===================================================================
--- trunk/bin/upgrading/proplists.dat	2010-09-17 07:32:07 UTC (rev 17402)
+++ trunk/bin/upgrading/proplists.dat	2010-09-17 11:05:34 UTC (rev 17403)
@@ -1543,7 +1543,40 @@
   cldversion: 8
 
 userproplist.purge_external_content:
-    datatype: char
-    cldversion: 8
-    des: Should external content be deleted when journal is deleted. Two bool flags separated by comma: <delete-comments>:<delete-community-entries>
+  datatype: char
+  cldversion: 8
+  des: Should external content be deleted when journal is deleted. Two bool flags separated by comma: <delete-comments>:<delete-community-entries>
 
+ratelist.addfriend:
+  des: Logged when a user adds someone to their Friends list
+
+ratelist.comm_in_vertical:
+  des: Logged when a community's entry gets added to a vertical
+
+ratelist.ctflag:
+  des: Logged when user flags content
+
+ratelist.failed_login:
+  des: Logged when wrong username/password is used
+
+ratelist.in_vertical:
+  des: Logged when a journal's entry gets added to a vertical
+
+ratelist.lostinfo:
+  des: Logged when a forgotten password or username e-mail is requested
+
+ratelist.post:
+  des: Logged whenever user posts (to any journal)
+
+ratelist.sms_register:
+  des: Logged when a user registers a number for SMS
+
+ratelist.syn_in_vertical:
+  des: Logged when a syndicated account's entry gets added to a vertical
+
+ratelist.tellafriend:
+  des: Logged when a users sends a message via Tell A Friend
+
+ratelist.usermessage:
+  des: Logged when a users sends a message to another user
+

Modified: trunk/bin/upgrading/update-db.pl
===================================================================
--- trunk/bin/upgrading/update-db.pl	2010-09-17 07:32:07 UTC (rev 17402)
+++ trunk/bin/upgrading/update-db.pl	2010-09-17 11:05:34 UTC (rev 17403)
@@ -606,8 +606,13 @@
               'usermsgproplist' => 'name',
               'pollproplist2'   => 'name',
               'categoryproplist' => 'name',
+              'ratelist' => 'name',
               );
 
+    my %noscope = (
+        'ratelist' => 1,
+    );
+
     my $table;  # table
     my $pk;     # table's primary key name
     my $pkv;    # primary key value
@@ -637,7 +642,7 @@
             ($table, $pkv) = ($1, $2);
             $pk = $pk{$table} or die "Don't know non-numeric primary key for table '$table'";
             $vals{$pk} = $pkv;
-            $vals{"scope"} = $scope;
+            $vals{"scope"} = $scope unless exists $noscope{$table};
             next;
         }
         if (/^\s+(\w+)\s*:\s*(.+)/) {

Tags: andy, dat, livejournal, pl, sql
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments