GIT.Harvie.CZ
/
mirrors
/
SokoMan.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dokumentace migrace DB
[mirrors/SokoMan.git]
/
assistants
/
migrations.inc.php
diff --git
a/assistants/migrations.inc.php
b/assistants/migrations.inc.php
index dd7b436d1ecec8afd2ee0f6586a38a2383370d96..93a720f8fef46d7c3f4fb7944de9a97219892946 100644
(file)
--- a/
assistants/migrations.inc.php
+++ b/
assistants/migrations.inc.php
@@
-1,4
+1,8
@@
<pre>
<pre>
+<h1>-- Remove all uncountable items</h1>
+SELECT DISTINCT model_countable FROM model;
+DELETE item FROM item LEFT JOIN barcode USING(barcode_id) LEFT JOIN model USING(model_id) WHERE model_countable=0;
+UPDATE model SET model_countable=1;
<h1>-- populate barcode table</h1><?php
$data = $this->db->safe_query_fetch('SELECT model_id as id, model_barcode as bar FROM model;', false);
//print_r($data);
<h1>-- populate barcode table</h1><?php
$data = $this->db->safe_query_fetch('SELECT model_id as id, model_barcode as bar FROM model;', false);
//print_r($data);
This page took
0.138971 seconds
and
4
git commands to generate.