brucestull / technology-and-perceptibility

Accessible web application with data storage, analysis, and presentation.
GNU General Public License v3.0
0 stars 1 forks source link

TAP model title is removed. #208

Closed brucestull closed 2 years ago

brucestull commented 2 years ago

The TAP title attribute is not needed since we use a url_label.

brucestull commented 2 years ago

Commands to make migrations, verify them, and perform them.

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.