Closed Bug 686160 Opened 14 years ago Closed 13 years ago

Update scripts/schema.sql

Categories

(support.mozilla.org :: General, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2012.11

People

(Reporter: jsocol, Assigned: rrosario)

Details

(Whiteboard: u=dev c=general p=2)

We should update scripts/schema.sql and wipe out old migrations again. There are a number of things that need to be added to, and removed from, schema.sql.
Assignee: james → nobody
Assignee: nobody → erik
Assignee: erik → nobody
Target Milestone: 2011-09-27 → 2011Q4
Whiteboard: u=dev c= s= p=
Target Milestone: 2011Q4 → 2012Q1
Whiteboard: u=dev c= s= p= → u=dev c=general p=2
Target Milestone: 2012Q1 → 2012.11
Priority: -- → P3
This is the can that keeps getting kicked, but fixing it makes life easier for contributors and new developers. I have no idea what this entails, though. Can someone who's done it before walk through the steps?
I haven't done this before, but the steps should be something like: 1- Get a fresh db dump from production. 2- Export(?) the schema to scripts/schema.sql 3- Remove all of the migrations/*.sql 4- Commit to repo I am not sure about the details of step 2, but I assume that is straightforward.
You don't want any of the production data, but several of the Django tables should be non-empty. This is what I did: 1) Create a new database. 2) Load scripts/schema.sql. 3) Run schematic. 4) mysqldump back to scripts/schema.sql. 5) Remove the migrations/*sql files, or at least most of them. An alternative would be to syncdb with a new database, then mysqldump the output of that. That *should* be the same**. Double check table engine and charset/collation, though. ** Well, technically it won't, because we never added migrations for the djcelery tables. Which we should do. But we can just add those with CREATE TABLE IF NOT EXISTS and should be fine.
Assignee: nobody → rrosario
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.