Initial checkin.
Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
commit
30132626b8
68 changed files with 5497 additions and 0 deletions
17
samples/mysql/update-0.05-to-0.06.sql
Normal file
17
samples/mysql/update-0.05-to-0.06.sql
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#
|
||||
# $Id: update-0.05-to-0.06.sql 102 2009-09-16 18:46:27Z alba $
|
||||
#
|
||||
# Update from version 0.05 to 0.06
|
||||
|
||||
# Check for errors (should return no rows)
|
||||
SELECT status,posted FROM @sample@ WHERE posted and status <> 'moderated';
|
||||
SELECT status,posted FROM @sample@ WHERE status = 0;
|
||||
|
||||
# Add value 'posted' to column 'status'.
|
||||
ALTER TABLE @sample@ CHANGE Status Status enum('pending','spam','moderated','rejected','deleted','posted');
|
||||
|
||||
# Transfer column 'posted' to column 'status'.
|
||||
UPDATE @sample@ SET Status = 'posted' WHERE posted;
|
||||
|
||||
# Remove column 'posted'.
|
||||
ALTER TABLE @sample@ DROP column posted;
|
||||
Loading…
Add table
Add a link
Reference in a new issue