-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
202 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.10.8 on 2018-08-27 05:41 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('mooring', '0037_auto_20180814_1433'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='rate', | ||
name='adult', | ||
field=models.DecimalField(decimal_places=2, default='10.00', max_digits=8, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='rate', | ||
name='child', | ||
field=models.DecimalField(decimal_places=2, default='2.20', max_digits=8, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='rate', | ||
name='concession', | ||
field=models.DecimalField(decimal_places=2, default='6.60', max_digits=8, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='rate', | ||
name='infant', | ||
field=models.DecimalField(decimal_places=2, default='0', max_digits=8, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.10.8 on 2018-08-27 06:22 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('mooring', '0038_auto_20180827_1341'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='rate', | ||
name='adult', | ||
field=models.DecimalField(blank=True, decimal_places=2, default='10.00', max_digits=8, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='rate', | ||
name='child', | ||
field=models.DecimalField(blank=True, decimal_places=2, default='2.20', max_digits=8, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='rate', | ||
name='concession', | ||
field=models.DecimalField(blank=True, decimal_places=2, default='6.60', max_digits=8, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='rate', | ||
name='infant', | ||
field=models.DecimalField(blank=True, decimal_places=2, default='0', max_digits=8, null=True), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='rate', | ||
unique_together=set([]), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# -*- coding: utf-8 -*- | ||
# Manually Created | ||
|
||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('mooring', '0039_auto_20180827_1422'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunSQL( | ||
sql="""CREATE OR REPLACE VIEW mooring_mooringsiteclass_pricehistory_v AS | ||
SELECT DISTINCT classes.campsite_class_id AS id, | ||
classes.date_start, | ||
classes.date_end, | ||
r.id AS rate_id, | ||
r.adult, | ||
r.concession, | ||
r.child, | ||
classes.details, | ||
classes.reason_id, | ||
r.infant, | ||
r.mooring | ||
FROM mooring_rate r | ||
INNER JOIN ( | ||
SELECT distinct cc.id AS campsite_class_id, | ||
cr.rate_id AS campsite_rate_id, | ||
cr.date_start AS date_start, | ||
cr.date_end AS date_end, | ||
cr.details AS details, | ||
cr.reason_id AS reason_id | ||
FROM mooring_mooringsite cs, | ||
mooring_mooringsiteclass cc, | ||
mooring_mooringsiterate cr | ||
WHERE cs.mooringsite_class_id = cc.id AND | ||
cr.campsite_id = cs.id AND | ||
cr.update_level = 1 | ||
) classes ON r.id = classes.campsite_rate_id;""", | ||
), | ||
migrations.RunSQL( | ||
sql="""CREATE OR REPLACE VIEW mooring_mooringarea_pricehistory_v AS | ||
SELECT DISTINCT camps.mooringarea_id AS id, | ||
cr.date_start, | ||
cr.date_end, | ||
r.id AS rate_id, | ||
r.adult, | ||
r.concession, | ||
r.child, | ||
cr.details, | ||
cr.reason_id, | ||
r.infant, | ||
r.mooring | ||
FROM mooring_mooringsiterate cr | ||
INNER JOIN mooring_rate r ON r.id = cr.rate_id | ||
INNER JOIN ( | ||
SELECT cg.id AS mooringarea_id, | ||
cs.name AS name, | ||
cs.id AS campsite_id | ||
FROM mooring_mooringsite cs, | ||
mooring_mooringarea cg | ||
WHERE cs.mooringarea_id = cg.id AND | ||
cg.id = cs.mooringarea_id AND | ||
cg.price_level = 0 | ||
) camps ON cr.campsite_id = camps.campsite_id;""", | ||
), | ||
] |
Oops, something went wrong.