Closed
Bug 686160
Opened 14 years ago
Closed 13 years ago
Update scripts/schema.sql
Categories
(support.mozilla.org :: General, defect, P3)
support.mozilla.org
General
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.
Reporter | ||
Updated•14 years ago
|
Assignee: james → nobody
Updated•14 years ago
|
Assignee: nobody → erik
Updated•14 years ago
|
Assignee: erik → nobody
Target Milestone: 2011-09-27 → 2011Q4
Reporter | ||
Updated•13 years ago
|
Whiteboard: u=dev c= s= p=
Assignee | ||
Updated•13 years ago
|
Target Milestone: 2011Q4 → 2012Q1
Assignee | ||
Updated•13 years ago
|
Whiteboard: u=dev c= s= p= → u=dev c=general p=2
Target Milestone: 2012Q1 → 2012.11
Comment 1•13 years ago
|
||
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?
Assignee | ||
Comment 2•13 years ago
|
||
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.
Reporter | ||
Comment 3•13 years ago
|
||
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 | ||
Updated•13 years ago
|
Assignee: nobody → rrosario
Assignee | ||
Comment 4•13 years ago
|
||
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.
Description
•