Max Vlasov <[email protected]> wrote: > As I recall sqlite probably doesn't case about string types included > in the CREATE TABLE field list, so TEXT, VARCHAR, VARCHAR(200) are > identical from its point of view. Today I needed to increase the > number of chars in VARCHAR statement since the library that uses > sqlite actually does care about the value. So I did it with > writable_schema pragma temporary change. Everything worked but just > wondering, what kind of changes are safe if it is absolutely > necessary?
Basically, any changes that don't affect the interpretation of bits already present in the database file. > I suppose the order of fields and the presence of every > one of them is absolutely necessary, but what about types changes > like moving from INTEGER to TEXT? Should be safe, unless there is an index involving the column. Column affinity affects comparisons, so the existing sorting order may be wrong for the new affinity. And, of course, you'll have a table where some rows (old ones) contain integers and others (new ones) contain text. SQLite is fine with this, but your client software might not be prepared to deal with it. Some comparisons might behave in surprising ways. Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

