<commit_before>   
<?php
  /*
   All Emoncms code is released under the GNU Affero General Public License.
   See COPYRIGHT.txt and LICENSE.txt.

    ---------------------------------------------------------------------
    Emoncms - open source energy visualisation
    Part of the OpenEnergyMonitor project:
    http://openenergymonitor.org
  */

 // 8th of March upgrade
 // db_query("ALTER TABLE  `users` ADD  `lastlogin` DATETIME");
 // db_query("ALTER TABLE  `users` ADD  `admin` INT NOT NULL");
  
    require "./db.php";
  	db_connect();
	
	// upgrade dashboard table with primary key, foreign key and name and description fields
  	db_query("ALTER TABLE dashboard ADD COLUMN id int(11) NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY (id,userid)");
	db_query("ALTER TABLE dashboard ADD FOREIGN KEY (userid) REFERENCES users(id)");
	db_query("ALTER TABLE dashboard ADD `name` VARCHAR(30) DEFAULT 'no name'");
	db_query("ALTER TABLE dashboard ADD `description` VARCHAR(255) DEFAULT 'no description'");
?><commit_msg>Only foreing key alter table<commit_after>   
<?php
  /*
   All Emoncms code is released under the GNU Affero General Public License.
   See COPYRIGHT.txt and LICENSE.txt.

    ---------------------------------------------------------------------
    Emoncms - open source energy visualisation
    Part of the OpenEnergyMonitor project:
    http://openenergymonitor.org
  */

 // 8th of March upgrade
 // db_query("ALTER TABLE  `users` ADD  `lastlogin` DATETIME");
 // db_query("ALTER TABLE  `users` ADD  `admin` INT NOT NULL");
  
    require "./db.php";
  	db_connect();
	
	// upgrade dashboard table with primary key, foreign key and name and description fields
  	//db_query("ALTER TABLE dashboard ADD COLUMN id int(11) NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY (id,userid)");
	db_query("ALTER TABLE dashboard ADD FOREIGN KEY (userid) REFERENCES users(id)");
	//db_query("ALTER TABLE dashboard ADD `name` VARCHAR(30) DEFAULT 'no name'");
	//db_query("ALTER TABLE dashboard ADD `description` VARCHAR(255) DEFAULT 'no description'");
?>
{'fraction_non_alphanumeric': 0.16658548465660009, 'fraction_numerical': 0.007793472966390648, 'mean_word_length': 2.8827977315689983, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2599976', 'n_tokens_mistral': 619, 'n_tokens_neox': 582, 'n_words': 212}