barrel 0.7.0 puts a semicolon in ALTER TABLE for indexes in Sqlite

Message ID
DKIM signature
Download raw message
Hey there! I’m using Barrel 0.7.0 and have found a problem while adding a table.

Here’s the code I have:

    use barrel::backend::Sqlite;
    use barrel::{types, Migration};

    pub fn migration() -> String {
        let mut m = Migration::new();

        m.change_table("items", |t| {
            t.add_index("idx_next", types::index(&["next"]))


this outputs the following SQL:

    ALTER TABLE "items" ;CREATE  INDEX "idx_next" ON "items" ("next”);

note the interior semicolon. Sqlite doesn’t accept this, of course.

Not a huge rush to fix from my perspective, but I thought you should know!
Reply to thread Export thread (mbox)