mirror of
https://github.com/house-of-vanity/tracker_watcher.git
synced 2025-07-07 09:54:08 +00:00
Sqldump actions were simplefied
This commit is contained in:
10
schema.sql
10
schema.sql
@ -28,7 +28,7 @@ CREATE TABLE `contact` (
|
|||||||
`user_id` int(20) NOT NULL COMMENT 'Telegram user id',
|
`user_id` int(20) NOT NULL COMMENT 'Telegram user id',
|
||||||
`reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'First /start message',
|
`reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'First /start message',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=latin1;
|
) ENGINE=InnoDB AUTO_INCREMENT=1 CHARSET=utf8;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
--
|
--
|
||||||
@ -46,7 +46,7 @@ CREATE TABLE `log` (
|
|||||||
`link` int(11) DEFAULT '0',
|
`link` int(11) DEFAULT '0',
|
||||||
`user_id` int(11) DEFAULT '0',
|
`user_id` int(11) DEFAULT '0',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=584 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=1 CHARSET=utf8;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
--
|
--
|
||||||
@ -62,7 +62,7 @@ CREATE TABLE `notification` (
|
|||||||
`user_id` int(20) NOT NULL COMMENT 'user id on telegram',
|
`user_id` int(20) NOT NULL COMMENT 'user id on telegram',
|
||||||
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Creation date',
|
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Creation date',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=latin1;
|
) ENGINE=InnoDB AUTO_INCREMENT=1 CHARSET=utf8;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
--
|
--
|
||||||
@ -79,7 +79,7 @@ CREATE TABLE `url` (
|
|||||||
`u_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Last update on rutracker',
|
`u_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Last update on rutracker',
|
||||||
`last_check` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`last_check` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=latin1;
|
) ENGINE=InnoDB AUTO_INCREMENT=1 CHARSET=utf8;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
|
|
||||||
@ -91,4 +91,4 @@ CREATE TABLE `url` (
|
|||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2018-01-29 17:35:08
|
-- Dump completed on 2018-01-29 17:51:49
|
||||||
|
3
sqldump.sh
Executable file
3
sqldump.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
mysqldump --login-path=localhost rutracker_bot --no-data | \
|
||||||
|
sed -e 's/AUTO_INCREMENT=.* /AUTO_INCREMENT=1 /g' -e 's/latin1/utf8/g' > schema.sql
|
Reference in New Issue
Block a user