Paulina Szklarska
1 min readAug 8, 2018

--

Oh sorry, my bad! SQLite doesn’t support DROP constraint command. So I think the only way is to create another table, eg.:

CREATE TABLE maintenanceTable2 (_id INTEGER PRIMARY KEY, timestamp INTEGER)

transfer all the data:

INSERT INTO maintenanceTable2 (_id, timestamp) SELECT (_id, timestamp) FROM maintenanceTable

then remove the old table:

DROP TABLE maintenanceTable

and rename the newly created table as the old one:

ALTER TABLE maintenanceTable2 RENAME TO maintenanceTable

Let me know if this works for you as I’m writing this without possibility to check ;)

--

--

Paulina Szklarska
Paulina Szklarska

Written by Paulina Szklarska

Flutter GDE / Flutter & Android Developer / blogger / speaker / cat owner / travel enthusiast

Responses (1)