Closed brucestull closed 2 years ago
python manage.py makemigrations taps
python manage.py sqlmigrate taps 0008
BEGIN;
--
-- Remove field title from tap
--
CREATE TABLE "new__taps_tap" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "description" text NOT NULL, "url_label" varchar(200) NOT NULL, "url" varchar(200) NOT NULL, "author_id" bigint NOT NULL REFERENCES "users_customuser" ("id") DEFERRABLE INITIALLY DEFERRED);
INSERT INTO "new__taps_tap" ("id", "description", "url_label", "url", "author_id") SELECT "id", "description", "url_label", "url", "author_id" FROM "taps_tap";
DROP TABLE "taps_tap";
ALTER TABLE "new__taps_tap" RENAME TO "taps_tap";
CREATE INDEX "taps_tap_author_id_a4b68eb9" ON "taps_tap" ("author_id");
COMMIT;
python manage.py migrate taps
Operations to perform:
Apply all migrations: taps
Running migrations:
Applying taps.0008_remove_tap_title... OK
python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions, taps, users
Running migrations:
No migrations to apply.
The TAP title attribute is not needed since we use a url_label.