# SQLite and migrations

**URL:** <https://www.ruby-forum.com/t/sqlite-and-migrations/88016>\
**Category:** Rails\
**Created:** [March 7, 2007, 3:59pm UTC](https://www.ruby-forum.com/t/sqlite-and-migrations/88016 "2007-03-07T15:59:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AurSSSSlien\_Malisar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@AurSSSSlien\_Malisar](https://www.ruby-forum.com/u/AurSSSSlien_Malisar)\
**Post date:** [March 7, 2007, 3:59pm UTC](https://www.ruby-forum.com/t/sqlite-and-migrations/88016/1 "2007-03-07T15:59:46Z")

</div>

Hello everybody.

Something intriguing me for a while: is sqlite full compatible with  
the Rails’s migrations system?

I ask that because I know sqlite doesn’t implement fully the SQL  
“standard” (e.g. see [ALTER TABLE](http://www.sqlite.org/lang_altertable.html) to  
learn that with ALTER TABLE, you cannot remove/edit any field, you are  
just able to rename the table or add a field).

Is the rails connector also limited or not?  
Does anyone contournated this problem by any way?

Thanks.

---

<div class="post-metadata">

**Author:** ![AurSSSSlien\_Malisar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@AurSSSSlien\_Malisar](https://www.ruby-forum.com/u/AurSSSSlien_Malisar)\
**Post date:** [March 7, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/sqlite-and-migrations/88016/2 "2007-03-07T16:22:52Z")

</div>

On 3/7/07, Aurélien Malisart [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I ask that because I know sqlite doesn’t implement fully the SQL  
> “standard” (e.g. see [ALTER TABLE](http://www.sqlite.org/lang_altertable.html) to  
> learn that with ALTER TABLE, you cannot remove/edit any field, you are  
> just able to rename the table or add a field).  
> Is the rails connector also limited or not?

ActiveRecord::ConnectionAdapters::SQLiteAdapter actually creates a  
new table, puts stuff in, makes the change, then drops the old table  
and renames (moves) the new table back to the original one, so  
apparently this is circumvented…

d.

---

<div class="post-metadata">

**Author:** ![AurSSSSlien\_Malisar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@AurSSSSlien\_Malisar](https://www.ruby-forum.com/u/AurSSSSlien_Malisar)\
**Post date:** [March 7, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/sqlite-and-migrations/88016/3 "2007-03-07T16:39:54Z")

</div>

OK thanks. I thought to this solution…
