PageRenderTime 157ms CodeModel.GetById 72ms app.highlight 9ms RepoModel.GetById 72ms app.codeStats 0ms

/data/sql/dbmigrate-24_to_25.sql

http://github.com/tomahawk-player/tomahawk
SQL | 17 lines | 9 code | 5 blank | 3 comment | 1 complexity | 47f50d57ec5cbd298a5bf9b85669dbc9 MD5 | raw file
 1-- Script to migate from db version 24 to 25.
 2-- Added the social_attributes table.
 3--
 4
 5ALTER TABLE dynamic_playlist RENAME TO tmp_dynamic_playlist;
 6
 7CREATE TABLE IF NOT EXISTS dynamic_playlist (
 8    guid TEXT NOT NULL REFERENCES playlist(guid) ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,
 9    pltype TEXT, -- the generator type
10    plmode INTEGER -- the mode of this playlist
11);
12
13INSERT INTO dynamic_playlist( guid, pltype, plmode ) SELECT guid, pltype, plmode FROM tmp_dynamic_playlist;
14
15DROP TABLE tmp_dynamic_playlist;
16
17UPDATE settings SET v = '25' WHERE k == 'schema_version';