Browse Source

Delete all transaction data - Script and update to latest master data

Bernhard 5 years ago
parent
commit
883ec0be6d
2 changed files with 28 additions and 7 deletions
  1. 19 0
      scanapp_delete_transaction_data.sql
  2. 9 7
      scanapp_master_data.sql

+ 19 - 0
scanapp_delete_transaction_data.sql

@@ -0,0 +1,19 @@
+delete from scanapp_useractivity where 1;
+delete from scanapp_recycledmaterial where 1;
+delete from scanapp_statisticsindex where 1;
+delete from scanapp_popupuser where 1;
+delete from scanapp_bulkrecycling where 1;
+delete from scanapp_ean_code where 1;
+delete from scanapp_userbadge where 1;
+delete from scanapp_ranking where 1;
+delete from scanapp_userstatistics where 1;
+delete from scanapp_bom where 1;
+delete from scanapp_product where 1;
+delete from auth_user where ( username <> "admin" and username <> "test150" );
+delete from account_emailaddress where (email <> "test150@test.com" );
+delete from authtoken_token where 1;
+delete from django_session where 1;
+delete from scanapp_popupuserhistory where 1;
+delete from scanapp_alluserstatisticsindex where 1;
+delete from scanapp_pushsubscription where 1;
+delete from scanapp_alluserstatistics where 1;

+ 9 - 7
scanapp_master_data.sql

@@ -117,7 +117,9 @@ INSERT INTO `scanapp_activity` (`id`, `name`, `publicly_available`) VALUES
 
 INSERT INTO `scanapp_activitytranslation` (`id`, `translation`, `activity_id`, `language_id`) VALUES
 (1, 'Massenrecycling', 28, 7),
-(2, 'Material recycled', 16, 7);
+(2, 'Material recycled', 16, 7),
+(3, 'Bulk recycling', 28, 4),
+(4, 'Material recycled', 16, 4);
 
 
 INSERT INTO `scanapp_activitypoints` (`id`, `from_date`, `to_date`, `recycling_points`, `drops`, `activity_id`, `esd`) VALUES
@@ -351,19 +353,19 @@ INSERT INTO `scanapp_badgetypetext` (`id`, `name_short`, `name_long`, `badge_typ
 
 
 INSERT INTO `scanapp_producttype` (`id`, `is_packaging_material`, `icon`, `deleted`, `name`, `lvl_001`, `lvl_002`, `lvl_003`, `lvl_004`, `lvl_005`) VALUES
-(1, 0, 'icon_metal', 0, 'Product Types', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
+(1, 0, 'static/drops.png', 0, 'Product Types', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
 (2, 1, 'icon_glass', 0, 'Recycling Materials', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
-(10, 1, 'icon_metall', 0, 'Aluminium', '0.000012', '0.000024', '0.000036', '0.000048', '0.000006'),
+(10, 1, 'icon_metall', 0, 'Aluminium', '0.002173', '0.000960', '0.000000', '0.003867', '0.000000'),
 (13, 1, 'biod', 0, 'Biodegradable', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
-(16, 1, 'paper', 0, 'Paper and Cardboard', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
+(16, 1, 'paper', 0, 'Paper and Cardboard', '0.003375', '0.000477', '0.000001', '0.004825', '0.000000'),
 (19, 1, 'icon_div', 0, 'E-Waste', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
 (22, 1, 'icon_battery', 0, 'Batteries', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
 (25, 1, 'plastic', 0, 'Plastic', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
-(28, 1, 'PET', 0, 'PET-Plastic', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
+(28, 1, 'PET', 0, 'PET-Plastic', '0.001520', '0.002280', '0.000000', '0.001044', '0.000000'),
 (31, 1, 'icon_metal', 0, 'Metal', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
 (34, 1, 'Wood', 0, 'Wood', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
-(37, 1, 'Tires', 0, 'Tires', '0.000100', '0.000200', '0.000300', '0.000400', '0.000500'),
-(40, 1, 'glass', 0, 'Glass', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
+(37, 1, 'Tires', 0, 'Tires', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
+(40, 1, 'glass', 0, 'Glass', '0.000105', '0.000735', '0.000000', '0.000455', '0.000000'),
 (43, 1, 'nores-plastic', 0, 'Waste (non-recyclable)', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
 (46, 0, 'icon_dummy', 0, 'PET 0,5l', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),
 (49, 0, 'icon_dummy', 0, 'PET 1,0l', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000'),