Steve Baker 1b2cd7495d Add resource.root_stack_id column
This change adds a root_stack_id column to the resource
record to allow a subsequent change enforce
max_resources_per_stack with a single query instead of the
many it currently requires.

This change includes the following:
- Data migration to add the resource.root_stack_id column
  and populate all existing resources with their calculated
  root stack
- Make new resources aquire and set their root_stack_id on
  store or update.
- StackResource._validate_nested_resources use the stored
  root_stack_id resulting in a ~15% performance improvement
  for the creation time of a test stack containing 40 nested
  stacks.

Change-Id: I2b00285514235834131222012408d2b5b2b37d30
Partial-Bug: 1489548
2015-09-22 15:43:15 +12:00
..
2015-08-26 12:11:27 +03:00
2015-03-17 06:09:26 -04:00
2015-09-22 15:43:15 +12:00
2015-08-26 12:11:27 +03:00