source: cpc/trunk/project/bin/ @ 2672

Last change on this file since 2672 was 2672, checked in by teymour, 9 years ago

Gestion des sous amendements dans la table sous-amendements

File size: 613 bytes
1. bin/
2echo 'ALTER TABLE amendement ADD sous_amendement_de VARCHAR(8) NOT NULL AFTER numero' | mysql $MYSQLID $DBNAME
3echo 'select, a.texteloi_id, a.numero, t.triple_value from amendement a, tagging tg, tag t WHERE a.sort <> "Rectifié" and = tg.taggable_id AND = tg.tag_id AND t.triple_key = "sous_amendement_de"' |  mysql $MYSQLID $DBNAME | grep ^[0-9] | sed 's/\([A-F]\)\t/;\1;/'| sed 's/\t/;;/g' | awk -F';' '{print $1";"$3";"$5$6";"$7$6}'|awk -F';' '{print "update amendement set sous_amendement_de = \""$4"\" where id = "$1";"}' | mysql $MYSQLID $DBNAME
4php symfony doctrine:build-model
Note: See TracBrowser for help on using the repository browser.