# Android 30 SQLite ALTER TABLE Changes Can Break Migrations on Tables Used in Views

DevFeed: [Android 30 SQLite ALTER TABLE Changes Can Break Migrations on Tables Used in Views](<https://devfeed.tech/articles/mysterious-sqlite-bugs-and-how-to-solve-them-25530.md>)

Original publisher: [Read original article](<https://aleckazakova.com/posts/sqlite-sdk-30/>)

Author: Author

Published: 2020-07-22T14:02:11Z

Content type: tutorial

Language: en

Sources: [Posts on AlecStrong](<https://devfeed.tech/sources/posts-on-alecstrong.md>)

Topics: [SQLite](<https://devfeed.tech/topics/sqlite.md>), [Android](<https://devfeed.tech/topics/android.md>), [migration](<https://devfeed.tech/topics/migration.md>), [legacy](<https://devfeed.tech/topics/legacy.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [legacy](<https://devfeed.tech/tags/legacy.md>), [migrations](<https://devfeed.tech/tags/migrations.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>)

## AI overview

This article explains how Android 30's SQLite upgrade from 3.22.0 to 3.28.0 changes ALTER TABLE behavior for tables used in views, potentially causing runtime exceptions during migrations. It also discusses diagnosing obfuscated stack traces with mapping files and ReTrace.

## Source excerpt

TLDR: Android 30 upgrades SQLite from 3.22.0 -> 3.28.0, this introduces new alter table behavior which will potentially cause runtime exceptions when ALTER TABLE statements are ran on tables which are used in a view. To preserve old behavior turn on PRAGMA legacy_alter_table=ON before running your migrations. Late last week we experienced a weird bug on Cash App happening to a few of our developers - reproducibly but not for everyone.