diff --git a/gulpfile.js b/gulpfile.js
index 010611a5..ff55f8a3 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -2,7 +2,7 @@
* @Author: prpr
* @Date: 2016-07-21 13:38:26
* @Last Modified by: printempw
-* @Last Modified time: 2016-07-23 16:22:46
+* @Last Modified time: 2016-07-24 11:13:23
*/
var gulp = require('gulp'),
@@ -159,6 +159,7 @@ gulp.task('zip', function() {
return gulp.src([
'**/*.*',
+ '!tests/**/*.*',
'!node_modules/**/*.*',
'!textures/**/*.*',
'!.env',
diff --git a/tests/migration.php b/tests/migration.php
new file mode 100644
index 00000000..0c417320
--- /dev/null
+++ b/tests/migration.php
@@ -0,0 +1,53 @@
+query($sql);
+while ($row = $result->fetch_array()) {
+ if ($row['hash_steve'] != "") {
+ $t = new Models\Texture();
+ $t->name = $row['username']."-steve";
+ $t->type = "steve";
+ $t->hash = $row['hash_steve'];
+ $t->size = 0;
+ $t->uploader = 0;
+ $t->public = "1";
+ $t->upload_at = \Utils::getTimeFormatted();
+ $t->save();
+ echo $row['hash_steve']." saved.
";
+ }
+
+ if ($row['hash_alex'] != "") {
+ $t = new Models\Texture();
+ $t->name = $row['username']."-alex";
+ $t->type = "alex";
+ $t->hash = $row['hash_alex'];
+ $t->size = 0;
+ $t->uploader = 0;
+ $t->public = "1";
+ $t->upload_at = \Utils::getTimeFormatted();
+ $t->save();
+ echo $row['hash_alex']." saved.
";
+ }
+
+ if ($row['hash_cape'] != "") {
+ $t = new Models\Texture();
+ $t->name = $row['username']."-cape";
+ $t->type = "cape";
+ $t->hash = $row['hash_cape'];
+ $t->size = 0;
+ $t->uploader = 0;
+ $t->public = "1";
+ $t->upload_at = \Utils::getTimeFormatted();
+ $t->save();
+ echo $row['hash_cape']." saved.
";
+ }
+}
+
+exit;