add new location field
location of the DVD (room/box/case/etc)
locations table
===============
loc_id - primary key
parent_id - foreign key to locations.loc_id (same table) (NULLable)
name - varchar
+case 1 (loc_id=1, parent_id=NULL)
| |
| |________box1 (loc_id=2, parent_id=1)
| | |
| | |_______foo (loc_id=5, parent_id=2)
| | |
| | |_______bar (loc_id=6, parent_id=2)
| |
| |________baz (loc_id=7, parent_id=1)
|
+room a (loc_id=3, parent_id=NULL)
|
+my_box (loc_id=8, parent_id=NULL)
|
|________foo (loc_id=9, parent_id=8)
movies table
============
movie_id - primary key
loc_id - foreign key to locations.loc_id (NULLable)
fetching location in app.
=======
location = []
if movie.location:
location = [movie.
i = movie.location.
while i.parent:
i = i.parent
location_str = ' / '.join(
# returns f.e. "case 1 / box1 / foo"
Blueprint information
- Status:
- Started
- Approver:
- Piotr Ożarowski
- Priority:
- Undefined
- Drafter:
- Piotr Ożarowski
- Direction:
- Needs approval
- Assignee:
- Piotr Ożarowski
- Definition:
- Approved
- Series goal:
- Accepted for 2.x
- Implementation:
- Needs Infrastructure
- Milestone target:
- 2.0
- Started by
- Piotr Ożarowski
- Completed by