activefacts-examples 1.9.8 → 1.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/activefacts-examples.gemspec +2 -2
  4. data/cql/CinemaBookings.cql +7 -1
  5. data/cql/CinemaTickets.cql +6 -3
  6. data/cql/CompanyDirectorEmployee.cql +1 -1
  7. data/cql/Diplomacy.cql +2 -2
  8. data/cql/OilSupply.cql +3 -3
  9. data/cql/OneRoleNesting.cql +1 -1
  10. data/cql/SeparateSubtype.cql +6 -0
  11. data/cql/ServiceDirector.cql +13 -13
  12. data/cql/Supervision.cql +2 -3
  13. data/cql/Warehousing.cql +4 -4
  14. data/diagrams/json/CinemaTickets.json +7 -4
  15. data/diagrams/json/OilSupply.json +4 -4
  16. data/diagrams/json/OneRoleNesting.json +1 -1
  17. data/images/CinemaTickets.png +0 -0
  18. data/images/MultipleSubtyping.png +0 -0
  19. data/images/OilSupply.png +0 -0
  20. data/metadata/json/CinemaTickets.json +141 -149
  21. data/metadata/json/Metamodel.json +747 -466
  22. data/metadata/json/OilSupply.json +63 -63
  23. data/orm/Blog.orm +214 -214
  24. data/orm/CinemaTickets.orm +931 -962
  25. data/orm/ExampleModels2010.csproj +33 -0
  26. data/orm/MultipleSubtyping.orm +110 -9
  27. data/orm/OilSupply.orm +347 -353
  28. data/orm/Warehousing.orm +34 -22
  29. data/rails/models/CinemaTickets.models +5 -7
  30. data/rails/schema/Astronomy.schema.rb +14 -14
  31. data/rails/schema/CinemaBookings.schema.rb +49 -49
  32. data/rails/schema/CinemaTickets.schema.rb +97 -97
  33. data/rails/schema/Diplomacy.schema.rb +48 -48
  34. data/rails/schema/Metamodel.schema.rb +497 -497
  35. data/rails/schema/SeparateSubtype.schema.rb +18 -18
  36. data/rails/schema/VenueSeating.schema.rb +26 -26
  37. data/rails/schema/Warehousing.schema.rb +101 -101
  38. data/ruby/CinemaTickets.rb +7 -11
  39. data/ruby/OilSupply.rb +3 -3
  40. data/ruby/OneRoleNesting.rb +1 -1
  41. data/sql/server/CinemaTickets.sql +13 -13
  42. data/sql/server/OilSupply.sql +3 -3
  43. data/sql/server/OneRoleNesting.sql +6 -6
  44. metadata +8 -7
@@ -1328,10 +1328,10 @@
1328
1328
  </orm:Fact>
1329
1329
  <orm:Fact id="_405E6DA1-8898-4E3A-99F8-3A44ABD14A39" _Name="ReceiptIsOfReceivedItem">
1330
1330
  <orm:FactRoles>
1331
- <orm:Role id="_85128B25-17A8-4F3F-BF81-2177D8261A38" _IsMandatory="true" _Multiplicity="ZeroToOne" Name="">
1331
+ <orm:Role id="_85128B25-17A8-4F3F-BF81-2177D8261A38" _IsMandatory="false" _Multiplicity="ExactlyOne" Name="">
1332
1332
  <orm:RolePlayer ref="_33534731-F21E-4172-BD6A-4A0079FC22A5" />
1333
1333
  </orm:Role>
1334
- <orm:Role id="_B29749D2-74A9-4D8E-AE61-949F706C3D3F" _IsMandatory="false" _Multiplicity="OneToMany" Name="">
1334
+ <orm:Role id="_B29749D2-74A9-4D8E-AE61-949F706C3D3F" _IsMandatory="true" _Multiplicity="ZeroToMany" Name="">
1335
1335
  <orm:RolePlayer ref="_F1808EF9-FB0A-4AA5-A350-289F749F8A0C" />
1336
1336
  </orm:Role>
1337
1337
  </orm:FactRoles>
@@ -1367,7 +1367,7 @@
1367
1367
  </orm:ReadingOrders>
1368
1368
  <orm:InternalConstraints>
1369
1369
  <orm:UniquenessConstraint ref="_82B2B683-C9F4-426A-A1B9-C706528B4E9B" />
1370
- <orm:MandatoryConstraint ref="_0BC4DFCB-431F-4504-B2FE-BCDC37A1E859" />
1370
+ <orm:MandatoryConstraint ref="_72445AD3-4EB6-48A6-9215-F5C2009A9DE9" />
1371
1371
  </orm:InternalConstraints>
1372
1372
  </orm:Fact>
1373
1373
  <orm:Fact id="_D611F34A-B24E-4B7A-8DD9-5460932C4595" _Name="ReceiptHasReceiptID">
@@ -1462,10 +1462,10 @@
1462
1462
  </orm:Fact>
1463
1463
  <orm:Fact id="_0970991B-F286-4FE5-BBBF-F198CDEFC52A" _Name="DispatchIsOfDispatchItem">
1464
1464
  <orm:FactRoles>
1465
- <orm:Role id="_3C901322-2652-4FFA-B4FE-DA2BBD41CF88" _IsMandatory="true" _Multiplicity="ZeroToOne" Name="">
1465
+ <orm:Role id="_3C901322-2652-4FFA-B4FE-DA2BBD41CF88" _IsMandatory="false" _Multiplicity="ExactlyOne" Name="">
1466
1466
  <orm:RolePlayer ref="_BC357019-F2B4-4C1B-8AA2-DA967CF47FC3" />
1467
1467
  </orm:Role>
1468
- <orm:Role id="_E1AF0CD2-8018-43AC-85A5-53982D02B032" _IsMandatory="false" _Multiplicity="OneToMany" Name="">
1468
+ <orm:Role id="_E1AF0CD2-8018-43AC-85A5-53982D02B032" _IsMandatory="true" _Multiplicity="ZeroToMany" Name="">
1469
1469
  <orm:RolePlayer ref="_1CB67614-D245-4722-BB69-A7CCBF212220" />
1470
1470
  </orm:Role>
1471
1471
  </orm:FactRoles>
@@ -1500,8 +1500,8 @@
1500
1500
  </orm:ReadingOrder>
1501
1501
  </orm:ReadingOrders>
1502
1502
  <orm:InternalConstraints>
1503
- <orm:MandatoryConstraint ref="_C47D2D9D-9002-4B68-BC6B-EBEE08CFC251" />
1504
1503
  <orm:UniquenessConstraint ref="_70C90B1D-7888-4911-91CF-239304FE8F97" />
1504
+ <orm:MandatoryConstraint ref="_3703CC1D-A869-4B73-9072-A41D8035034C" />
1505
1505
  </orm:InternalConstraints>
1506
1506
  </orm:Fact>
1507
1507
  <orm:ImpliedFact id="_80C2FC06-D090-4532-9F56-6FA20548FC98" _Name="PurchaseOrderItemIsInvolvedInBackOrderAllocation">
@@ -2345,11 +2345,6 @@
2345
2345
  <orm:Role id="_B54ABE48-8492-4AC7-BE01-C05806D90C91" ref="_B29749D2-74A9-4D8E-AE61-949F706C3D3F" />
2346
2346
  </orm:RoleSequence>
2347
2347
  </orm:UniquenessConstraint>
2348
- <orm:MandatoryConstraint id="_0BC4DFCB-431F-4504-B2FE-BCDC37A1E859" Name="SimpleMandatoryConstraint26" IsSimple="true">
2349
- <orm:RoleSequence>
2350
- <orm:Role id="_8EEFC75B-1751-48FB-A2CF-C9C8CAF4FF05" ref="_85128B25-17A8-4F3F-BF81-2177D8261A38" />
2351
- </orm:RoleSequence>
2352
- </orm:MandatoryConstraint>
2353
2348
  <orm:UniquenessConstraint id="_58BB7CDC-CF1F-4984-8DF1-D9D4142355DF" Name="InternalUniquenessConstraint50" IsInternal="true">
2354
2349
  <orm:RoleSequence>
2355
2350
  <orm:Role id="_90783CD0-3960-4B5D-BFCC-BCFB6842BF20" ref="_5315F06E-F4F4-4BE0-AACE-37617B07AE70" />
@@ -2366,11 +2361,6 @@
2366
2361
  <orm:Role id="_C59D0792-FCCF-4B7B-9024-F717C75D1AE5" ref="_88EFABE1-5AD5-49FD-A1CF-AFBF8A025F2E" />
2367
2362
  </orm:RoleSequence>
2368
2363
  </orm:MandatoryConstraint>
2369
- <orm:MandatoryConstraint id="_C47D2D9D-9002-4B68-BC6B-EBEE08CFC251" Name="SimpleMandatoryConstraint28" IsSimple="true">
2370
- <orm:RoleSequence>
2371
- <orm:Role id="_7B548360-5FE8-46F5-B3E8-00EE1FFCE5B4" ref="_3C901322-2652-4FFA-B4FE-DA2BBD41CF88" />
2372
- </orm:RoleSequence>
2373
- </orm:MandatoryConstraint>
2374
2364
  <orm:UniquenessConstraint id="_70C90B1D-7888-4911-91CF-239304FE8F97" Name="InternalUniquenessConstraint52" IsInternal="true">
2375
2365
  <orm:RoleSequence>
2376
2366
  <orm:Role id="_8CB80A83-5FEB-4FB7-A0E7-D6B82EF588C0" ref="_E1AF0CD2-8018-43AC-85A5-53982D02B032" />
@@ -2536,6 +2526,28 @@
2536
2526
  <orm:Role id="_6C94C2C4-00CB-4CB5-8C93-C902D03F9CA1" ref="_A16CEB4C-D1D5-4D41-9543-62618EA8E718" />
2537
2527
  </orm:RoleSequence>
2538
2528
  </orm:UniquenessConstraint>
2529
+ <orm:MandatoryConstraint id="_3703CC1D-A869-4B73-9072-A41D8035034C" Name="SimpleMandatoryConstraint39" IsSimple="true">
2530
+ <orm:RoleSequence>
2531
+ <orm:Role id="_9EF4D4A6-F198-4A48-8AAC-F840B12B12F8" ref="_E1AF0CD2-8018-43AC-85A5-53982D02B032" />
2532
+ </orm:RoleSequence>
2533
+ </orm:MandatoryConstraint>
2534
+ <orm:MandatoryConstraint id="_72445AD3-4EB6-48A6-9215-F5C2009A9DE9" Name="SimpleMandatoryConstraint40" IsSimple="true">
2535
+ <orm:RoleSequence>
2536
+ <orm:Role id="_B839EAEC-25F3-46F0-8532-A3DABEC7E7FF" ref="_B29749D2-74A9-4D8E-AE61-949F706C3D3F" />
2537
+ </orm:RoleSequence>
2538
+ </orm:MandatoryConstraint>
2539
+ <orm:MandatoryConstraint id="_3521E884-C08C-44BF-B2F8-2CE4E3A675A1" Name="ImpliedMandatoryConstraint10" IsImplied="true">
2540
+ <orm:RoleSequence>
2541
+ <orm:Role id="_AB912158-7FF6-4368-BE14-7F90FF65AAF1" ref="_3C901322-2652-4FFA-B4FE-DA2BBD41CF88" />
2542
+ </orm:RoleSequence>
2543
+ <orm:ImpliedByObjectType ref="_BC357019-F2B4-4C1B-8AA2-DA967CF47FC3" />
2544
+ </orm:MandatoryConstraint>
2545
+ <orm:MandatoryConstraint id="_B1BEF6CD-76AC-4BE7-AEFF-EFBD87F4CBE8" Name="ImpliedMandatoryConstraint11" IsImplied="true">
2546
+ <orm:RoleSequence>
2547
+ <orm:Role id="_4D35F291-C499-4DA5-B765-B098E181F957" ref="_85128B25-17A8-4F3F-BF81-2177D8261A38" />
2548
+ </orm:RoleSequence>
2549
+ <orm:ImpliedByObjectType ref="_33534731-F21E-4172-BD6A-4A0079FC22A5" />
2550
+ </orm:MandatoryConstraint>
2539
2551
  <orm:ExclusionConstraint id="_3EF31CE8-2C6A-4C79-B543-EDF8E3C77809" Name="ExclusiveOrConstraint1">
2540
2552
  <orm:RoleSequences>
2541
2553
  <orm:RoleSequence id="_DCF74BF0-5FB8-4535-8CB6-9EE898A591D0">
@@ -3090,7 +3102,7 @@
3090
3102
  <oial:relatedConceptType id="_80169475-7501-4918-9ECB-27296D5E021A" ref="_201C064F-A903-4536-A0EA-0C6296C64AF1" name="Received Item" oppositeName="Purchase Order Item" />
3091
3103
  <oial:relatedConceptType id="_63AAC4EA-87EE-48E8-AF7C-7BBF63086239" ref="_D9C1F852-4F62-42E4-AB0D-27714A8EDC1C" name="Received Item" oppositeName="Transfer Request" />
3092
3104
  <oial:relatedConceptType id="_E4DD9AC5-2A01-412D-B995-40286D86BB4C" ref="_6D1577EC-5531-4FAE-A6A6-3555F72235C9" isMandatory="true" name="Received Item" oppositeName="Product" />
3093
- <oial:relatedConceptType id="_437C42DF-3629-4A90-B5C3-7617442D56D4" ref="_62A661B8-2370-4A78-ADA3-BAB8410340FD" name="Received Item" oppositeName="Receipt" />
3105
+ <oial:relatedConceptType id="_437C42DF-3629-4A90-B5C3-7617442D56D4" ref="_62A661B8-2370-4A78-ADA3-BAB8410340FD" isMandatory="true" name="Received Item" oppositeName="Receipt" />
3094
3106
  </oial:children>
3095
3107
  <oial:uniquenessConstraints>
3096
3108
  <oial:uniquenessConstraint id="_B6A85BA0-3568-458D-90B9-47B947318FF1" name="InternalUniquenessConstraint43" isPreferred="true">
@@ -3119,7 +3131,7 @@
3119
3131
  <oial:relatedConceptType id="_10217177-C2A4-473B-AAA8-B2532A5BE79B" ref="_6D1577EC-5531-4FAE-A6A6-3555F72235C9" isMandatory="true" name="Dispatch Item" oppositeName="Product" />
3120
3132
  <oial:relatedConceptType id="_4187B1C5-6101-4D93-8E46-4156C2AAA54D" ref="_D9C1F852-4F62-42E4-AB0D-27714A8EDC1C" name="Dispatch Item" oppositeName="Transfer Request" />
3121
3133
  <oial:relatedConceptType id="_81744F2A-197F-49A2-B30D-7AEEB5B75E97" ref="_D25D8B71-B2D4-4346-985A-73BDF7AF1836" name="Dispatch Item" oppositeName="Sales Order Item" />
3122
- <oial:relatedConceptType id="_72801CFE-BC17-40A2-99F9-AE0F561DE50B" ref="_9187F9DA-76E8-4530-8259-217A3C050BF0" name="Dispatch Item" oppositeName="Dispatch" />
3134
+ <oial:relatedConceptType id="_72801CFE-BC17-40A2-99F9-AE0F561DE50B" ref="_9187F9DA-76E8-4530-8259-217A3C050BF0" isMandatory="true" name="Dispatch Item" oppositeName="Dispatch" />
3123
3135
  </oial:children>
3124
3136
  <oial:uniquenessConstraints>
3125
3137
  <oial:uniquenessConstraint id="_6158F14A-67F9-4476-B71C-6A9499A7F859" name="InternalUniquenessConstraint45" isPreferred="true">
@@ -3354,9 +3366,9 @@
3354
3366
  <rcd:Column id="_B1FD2253-118A-4006-95BB-13A711C21DFD" Name="receivedItemID" />
3355
3367
  <rcd:Column id="_3201383F-69BD-4AB0-B096-0CE29B7FA246" Name="productID" />
3356
3368
  <rcd:Column id="_0C838C74-5681-4561-8D70-6FE76BA10510" Name="quantity" />
3369
+ <rcd:Column id="_BAA66389-FD9A-4D09-A2B9-02B503DDD063" Name="receiptID" />
3357
3370
  <rcd:Column id="_1BA0CD9B-FBA3-449A-9FE3-2E38FFFE177A" Name="purchaseOrderItemProductID" IsNullable="true" />
3358
3371
  <rcd:Column id="_0B774932-D227-4B93-9CBD-51F7183F39E0" Name="purchaseOrderItemPurchaseOrderID" IsNullable="true" />
3359
- <rcd:Column id="_BAA66389-FD9A-4D09-A2B9-02B503DDD063" Name="receiptID" IsNullable="true" />
3360
3372
  <rcd:Column id="_E658B190-CCE4-42B2-86CD-18A029388511" Name="transferRequestID" IsNullable="true" />
3361
3373
  </rcd:Columns>
3362
3374
  <rcd:Constraints>
@@ -3436,9 +3448,9 @@
3436
3448
  <rcd:Table id="_09D2B3F8-3F03-4295-9356-18E78A8EEAC7" Name="DispatchItem">
3437
3449
  <rcd:Columns>
3438
3450
  <rcd:Column id="_77E9F503-6D05-4BB8-95F2-B05C517161E3" Name="dispatchItemID" />
3451
+ <rcd:Column id="_3D445FF8-7BC6-4D57-95B0-E8735692891B" Name="dispatchID" />
3439
3452
  <rcd:Column id="_08800A72-A219-4DBC-B25B-B0525BBE0C9C" Name="productID" />
3440
3453
  <rcd:Column id="_DE7F78BC-2EEC-4A56-BA68-B969E279E521" Name="quantity" />
3441
- <rcd:Column id="_3D445FF8-7BC6-4D57-95B0-E8735692891B" Name="dispatchID" IsNullable="true" />
3442
3454
  <rcd:Column id="_A32648C3-F612-4F66-8E12-C3E93EF00769" Name="salesOrderItemProductID" IsNullable="true" />
3443
3455
  <rcd:Column id="_B27F9D9E-B3C1-4EB8-952E-CF2232A4369D" Name="salesOrderItemSalesOrderID" IsNullable="true" />
3444
3456
  <rcd:Column id="_D7B857D0-D5FC-431E-BBC9-C3AED85B0A59" Name="transferRequestID" IsNullable="true" />
@@ -3551,7 +3563,7 @@
3551
3563
  <ormtooial:FactTypeMapsTowardsRole id="_CD265291-DBA3-48FF-8E2F-5A56FB454582" FactType="_DC6FDE71-F532-4B6A-8293-ACA5D73F9AF5" TowardsRole="_4EBCDA0D-F75E-4D22-AB1D-250161568A5B" Depth="Deep" UniquenessPattern="Subtype" MandatoryPattern="OppositeRoleMandatory" />
3552
3564
  <ormtooial:FactTypeMapsTowardsRole id="_62B0C6AE-503F-4EF5-90B5-D4AFD9D9C68C" FactType="_F198582F-DE7F-4B86-80D8-98878DA18F7A" TowardsRole="_E8C3B0E0-7433-4AA9-A754-88E3BB10AD7D" Depth="Shallow" UniquenessPattern="OneToMany" MandatoryPattern="TowardsRoleMandatory" />
3553
3565
  <ormtooial:FactTypeMapsTowardsRole id="_C02995D1-7A3D-482D-987B-635138A1E3C4" FactType="_83064BD4-1159-45A3-AAAF-FE6C0170A0E5" TowardsRole="_88EFABE1-5AD5-49FD-A1CF-AFBF8A025F2E" Depth="Shallow" UniquenessPattern="OneToOne" MandatoryPattern="TowardsRoleMandatory" />
3554
- <ormtooial:FactTypeMapsTowardsRole id="_A41FAE29-EB14-4695-B70B-BD54476DF470" FactType="_0970991B-F286-4FE5-BBBF-F198CDEFC52A" TowardsRole="_E1AF0CD2-8018-43AC-85A5-53982D02B032" Depth="Shallow" UniquenessPattern="OneToMany" MandatoryPattern="OppositeRoleMandatory" />
3566
+ <ormtooial:FactTypeMapsTowardsRole id="_A41FAE29-EB14-4695-B70B-BD54476DF470" FactType="_0970991B-F286-4FE5-BBBF-F198CDEFC52A" TowardsRole="_E1AF0CD2-8018-43AC-85A5-53982D02B032" Depth="Shallow" UniquenessPattern="OneToMany" MandatoryPattern="BothRolesMandatory" />
3555
3567
  <ormtooial:FactTypeMapsTowardsRole id="_1FDDA649-4668-4F4C-8937-A2E1D3516AEF" FactType="_3E06D16A-E2D6-44B7-AD44-50A86EF8687C" TowardsRole="_12DDDC2D-DC86-473C-91CB-0CC5E22E8794" Depth="Shallow" UniquenessPattern="OneToOne" MandatoryPattern="TowardsRoleMandatory" />
3556
3568
  <ormtooial:FactTypeMapsTowardsRole id="_E17A03D7-43E1-4DF2-99A3-072D698AD432" FactType="_3DAE0D55-9FFA-4046-B188-5BD5D600DD36" TowardsRole="_7AF8E764-F3C6-45F3-BAEA-97004DB7EEFC" Depth="Shallow" UniquenessPattern="OneToMany" MandatoryPattern="NotMandatory" />
3557
3569
  <ormtooial:FactTypeMapsTowardsRole id="_DFE5A3BC-8652-4BBD-967A-713AB56F44E5" FactType="_3F31D36E-26F5-4E8B-B840-062DF7C88160" TowardsRole="_CCB0715E-16D7-44EC-B189-142850750F82" Depth="Shallow" UniquenessPattern="OneToMany" MandatoryPattern="NotMandatory" />
@@ -3568,7 +3580,7 @@
3568
3580
  <ormtooial:FactTypeMapsTowardsRole id="_E15BBDAD-9F28-4A2F-8548-1FF2F621AF2B" FactType="_412A33C0-B2BD-4478-81B3-FBF1C4F1BC61" TowardsRole="_19875663-5BA3-468F-A407-E890F250E3CD" Depth="Shallow" UniquenessPattern="OneToMany" MandatoryPattern="TowardsRoleMandatory" />
3569
3581
  <ormtooial:FactTypeMapsTowardsRole id="_8B4FBDC7-22CF-4470-990B-52711E681CE3" FactType="_80C2FC06-D090-4532-9F56-6FA20548FC98" TowardsRole="_35465298-2B3F-436B-B656-FDA23D275E49" Depth="Shallow" UniquenessPattern="OneToMany" MandatoryPattern="TowardsRoleMandatory" />
3570
3582
  <ormtooial:FactTypeMapsTowardsRole id="_B12C77A6-BE89-4A68-B7EC-9EB2B1F75698" FactType="_D611F34A-B24E-4B7A-8DD9-5460932C4595" TowardsRole="_E7EEA8B6-8EE2-4C70-BA95-A25C735226B6" Depth="Shallow" UniquenessPattern="OneToOne" MandatoryPattern="TowardsRoleMandatory" />
3571
- <ormtooial:FactTypeMapsTowardsRole id="_60049278-DCBE-47B2-8BCB-3518953214EF" FactType="_405E6DA1-8898-4E3A-99F8-3A44ABD14A39" TowardsRole="_B29749D2-74A9-4D8E-AE61-949F706C3D3F" Depth="Shallow" UniquenessPattern="OneToMany" MandatoryPattern="OppositeRoleMandatory" />
3583
+ <ormtooial:FactTypeMapsTowardsRole id="_60049278-DCBE-47B2-8BCB-3518953214EF" FactType="_405E6DA1-8898-4E3A-99F8-3A44ABD14A39" TowardsRole="_B29749D2-74A9-4D8E-AE61-949F706C3D3F" Depth="Shallow" UniquenessPattern="OneToMany" MandatoryPattern="BothRolesMandatory" />
3572
3584
  <ormtooial:FactTypeMapsTowardsRole id="_3D67739F-79EF-41F4-B596-9BDF1C22E303" FactType="_2E8BD724-A7B3-4046-9FD2-F47B88471FA8" TowardsRole="_1490FB43-5A27-4362-B023-A5FE6BBF489E" Depth="Shallow" UniquenessPattern="OneToOne" MandatoryPattern="TowardsRoleMandatory" />
3573
3585
  <ormtooial:FactTypeMapsTowardsRole id="_20372DC7-EF2C-4AC2-BB42-C6D51B971EF0" FactType="_92DBDBDF-00FD-44B8-BC2C-70FF0F8875B1" TowardsRole="_EDD525A6-BEA4-42AF-8CC3-F04ADA159D2F" Depth="Shallow" UniquenessPattern="OneToMany" MandatoryPattern="NotMandatory" />
3574
3586
  <ormtooial:FactTypeMapsTowardsRole id="_D9398804-380B-40CE-A9ED-88D6B87ADEDA" FactType="_89726535-3947-4159-BE5B-1FF3EFC7C688" TowardsRole="_EDCF4785-AD5A-404A-ADEE-53ED8AC23DB6" Depth="Shallow" UniquenessPattern="OneToMany" MandatoryPattern="NotMandatory" />
@@ -57,8 +57,8 @@ module Concernz
57
57
  # Cinema is involved in Session
58
58
  has_many :sessions, :class_name => 'Session', :foreign_key => :cinema_id, :dependent => :destroy
59
59
 
60
- # Cinema is involved in Ticket Pricing
61
- has_many :ticket_pricings, :class_name => 'TicketPricing', :foreign_key => :cinema_id, :dependent => :destroy
60
+ # Ticket Category is for Cinema
61
+ has_many :ticket_categories, :class_name => 'TicketCategory', :foreign_key => :cinema_id, :dependent => :destroy
62
62
 
63
63
  validates :name, :presence => true
64
64
  end
@@ -170,17 +170,15 @@ module Concernz
170
170
  end
171
171
 
172
172
  module Concernz
173
- module TicketPricing
173
+ module TicketCategory
174
174
  extend ActiveSupport::Concern
175
175
  included do
176
- self.primary_key = 'ticket_pricing_id'
176
+ self.primary_key = 'ticket_category_id'
177
177
 
178
- # Ticket Pricing involves Cinema
178
+ # Ticket Category is for Cinema
179
179
  belongs_to :cinema, :foreign_key => :cinema_id
180
180
 
181
181
  validates :cinema_id, :presence => true
182
- validates :high_demand, :presence => true
183
- validates :price, :presence => true
184
182
  validates :section_name, :presence => true
185
183
  validates :session_time_year_nr, :presence => true
186
184
  validates :session_time_month_nr, :presence => true
@@ -1,25 +1,25 @@
1
1
  #
2
- # schema.rb auto-generated using ActiveFacts for Astronomy on 2015-07-08
2
+ # schema.rb auto-generated using ActiveFacts for Astronomy on 2016-06-23
3
3
  #
4
4
 
5
5
  ActiveRecord::Base.logger = Logger.new(STDOUT)
6
- ActiveRecord::Schema.define(:version => 20150708011545) do
6
+ ActiveRecord::Schema.define(version: 20160623164244) do
7
7
  enable_extension 'pgcrypto' unless extension_enabled?('pgcrypto')
8
- create_table "astronomical_objects", :id => false, :force => true do |t|
9
- t.column "astronomical_object_id", :primary_key, :null => false
10
- t.column "astronomical_object_code", :string, :limit => 12, :null => false
11
- t.column "is_in_orbit", :boolean, :null => true
12
- t.column "mass", :float, :limit => 32, :null => true
13
- t.column "moon_name", :string, :limit => 256, :null => true
14
- t.column "orbit_center_astronomical_object_id", :integer, :null => true
15
- t.column "orbit_nr_days", :float, :limit => 32, :null => true
16
- t.column "planet_name", :string, :limit => 256, :null => true
8
+ create_table "astronomical_objects", id: false, force: true do |t|
9
+ t.column "astronomical_object_id", :primary_key, null: false
10
+ t.column "astronomical_object_code", :string, limit: 12, null: false
11
+ t.column "is_in_orbit", :boolean, null: true
12
+ t.column "mass", :float, limit: 32, null: true
13
+ t.column "moon_name", :string, limit: 256, null: true
14
+ t.column "orbit_center_astronomical_object_id", :integer, null: true
15
+ t.column "orbit_nr_days", :float, limit: 32, null: true
16
+ t.column "planet_name", :string, limit: 256, null: true
17
17
  end
18
18
 
19
- add_index "astronomical_objects", ["astronomical_object_code"], :name => :index_astronomical_objects_on_astronomical_object_code, :unique => true
19
+ add_index "astronomical_objects", ["astronomical_object_code"], name: :index_astronomical_objects_on_astronomical_object_code, unique: true
20
20
 
21
21
  unless ENV["EXCLUDE_FKS"]
22
- add_foreign_key :astronomical_objects, :astronomical_objects, :column => :orbit_center_astronomical_object_id, :primary_key => :astronomical_object_id, :on_delete => :cascade
23
- add_index :astronomical_objects, [:orbit_center_astronomical_object_id], :unique => false, :name => :index_astronomical_objects_on_orbit_center_astronomic__575580d6
22
+ add_foreign_key :astronomical_objects, :astronomical_objects, column: :orbit_center_astronomical_object_id, primary_key: :astronomical_object_id, on_delete: :cascade
23
+ add_index :astronomical_objects, [:orbit_center_astronomical_object_id], unique: false, name: :index_astronomical_objects_on_orbit_center_astronomic__575580d6
24
24
  end
25
25
  end
@@ -1,78 +1,78 @@
1
1
  #
2
- # schema.rb auto-generated using ActiveFacts for CinemaBookings on 2015-07-08
2
+ # schema.rb auto-generated using ActiveFacts for Cinema Bookings on 2017-10-24
3
3
  #
4
4
 
5
5
  ActiveRecord::Base.logger = Logger.new(STDOUT)
6
- ActiveRecord::Schema.define(:version => 20150708011546) do
6
+ ActiveRecord::Schema.define(version: 20171024174747) do
7
7
  enable_extension 'pgcrypto' unless extension_enabled?('pgcrypto')
8
- create_table "bookings", :id => false, :force => true do |t|
9
- t.column "booking_id", :primary_key, :null => false
10
- t.column "person_id", :integer, :null => false
11
- t.column "session_id", :integer, :null => false
12
- t.column "is_confirmed", :boolean, :null => true
13
- t.column "number", :integer, :limit => 16, :null => false
8
+ create_table "bookings", id: false, force: true do |t|
9
+ t.column "booking_id", :primary_key, null: false
10
+ t.column "person_id", :integer, null: false
11
+ t.column "session_id", :integer, null: false
12
+ t.column "is_confirmed", :boolean, null: true
13
+ t.column "number", :integer, limit: 16, null: false
14
14
  end
15
15
 
16
- add_index "bookings", ["person_id", "session_id"], :name => :index_bookings_on_person_id_session_id, :unique => true
16
+ add_index "bookings", ["person_id", "session_id"], name: :index_bookings_on_person_id_session_id, unique: true
17
17
 
18
- create_table "cinemas", :id => false, :force => true do |t|
19
- t.column "cinema_id", :primary_key, :null => false
18
+ create_table "cinemas", id: false, force: true do |t|
19
+ t.column "cinema_id", :primary_key, null: false
20
20
  end
21
21
 
22
22
 
23
- create_table "films", :id => false, :force => true do |t|
24
- t.column "film_id", :primary_key, :null => false
25
- t.column "name", :string, :null => true
23
+ create_table "films", id: false, force: true do |t|
24
+ t.column "film_id", :primary_key, null: false
25
+ t.column "name", :string, null: true
26
26
  end
27
27
 
28
28
 
29
- create_table "people", :id => false, :force => true do |t|
30
- t.column "person_id", :primary_key, :null => false
31
- t.column "login_name", :string, :null => false
29
+ create_table "people", id: false, force: true do |t|
30
+ t.column "person_id", :primary_key, null: false
31
+ t.column "login_name", :string, null: false
32
32
  end
33
33
 
34
- add_index "people", ["login_name"], :name => :index_people_on_login_name, :unique => true
34
+ add_index "people", ["login_name"], name: :index_people_on_login_name, unique: true
35
35
 
36
- create_table "seats", :id => false, :force => true do |t|
37
- t.column "seat_id", :primary_key, :null => false
38
- t.column "row_cinema_id", :integer, :null => false
39
- t.column "row_nr", :string, :limit => 2, :null => false
40
- t.column "seat_number", :integer, :limit => 16, :null => false
41
- t.column "section_name", :string, :null => true
36
+ create_table "seats", id: false, force: true do |t|
37
+ t.column "seat_id", :primary_key, null: false
38
+ t.column "row_cinema_id", :integer, null: false
39
+ t.column "row_nr", :string, limit: 2, null: false
40
+ t.column "seat_number", :integer, limit: 16, null: false
41
+ t.column "section_name", :string, null: true
42
42
  end
43
43
 
44
- add_index "seats", ["row_cinema_id", "row_nr", "seat_number"], :name => :index_seats_on_row_cinema_id_row_nr_seat_number, :unique => true
44
+ add_index "seats", ["row_cinema_id", "row_nr", "seat_number"], name: :index_seats_on_row_cinema_id_row_nr_seat_number, unique: true
45
45
 
46
- create_table "seat_allocations", :id => false, :force => true do |t|
47
- t.column "booking_id", :integer, :null => false
48
- t.column "allocated_seat_id", :integer, :null => false
46
+ create_table "seat_allocations", id: false, force: true do |t|
47
+ t.column "booking_id", :integer, null: false
48
+ t.column "allocated_seat_id", :integer, null: false
49
49
  end
50
50
 
51
- add_index "seat_allocations", ["booking_id", "allocated_seat_id"], :name => :index_seat_allocations_on_booking_id_allocated_seat_id, :unique => true
51
+ add_index "seat_allocations", ["booking_id", "allocated_seat_id"], name: :index_seat_allocations_on_booking_id_allocated_seat_id, unique: true
52
52
 
53
- create_table "sessions", :id => false, :force => true do |t|
54
- t.column "session_id", :primary_key, :null => false
55
- t.column "cinema_id", :integer, :null => false
56
- t.column "film_id", :integer, :null => false
57
- t.column "date_time_value", :datetime, :null => false
53
+ create_table "sessions", id: false, force: true do |t|
54
+ t.column "session_id", :primary_key, null: false
55
+ t.column "cinema_id", :integer, null: false
56
+ t.column "film_id", :integer, null: false
57
+ t.column "date_time_value", :datetime, null: false
58
58
  end
59
59
 
60
- add_index "sessions", ["cinema_id", "date_time_value"], :name => :index_sessions_on_cinema_id_date_time_value, :unique => true
60
+ add_index "sessions", ["cinema_id", "date_time_value"], name: :index_sessions_on_cinema_id_date_time_value, unique: true
61
61
 
62
62
  unless ENV["EXCLUDE_FKS"]
63
- add_foreign_key :bookings, :people, :column => :person_id, :primary_key => :person_id, :on_delete => :cascade
64
- add_index :bookings, [:person_id], :unique => false, :name => :index_bookings_on_person_id
65
- add_foreign_key :bookings, :sessions, :column => :session_id, :primary_key => :session_id, :on_delete => :cascade
66
- add_index :bookings, [:session_id], :unique => false, :name => :index_bookings_on_session_id
67
- add_foreign_key :seats, :cinemas, :column => :row_cinema_id, :primary_key => :cinema_id, :on_delete => :cascade
68
- add_index :seats, [:row_cinema_id], :unique => false, :name => :index_seats_on_row_cinema_id
69
- add_foreign_key :seat_allocations, :bookings, :column => :booking_id, :primary_key => :booking_id, :on_delete => :cascade
70
- add_index :seat_allocations, [:booking_id], :unique => false, :name => :index_seat_allocations_on_booking_id
71
- add_foreign_key :seat_allocations, :seats, :column => :allocated_seat_id, :primary_key => :seat_id, :on_delete => :cascade
72
- add_index :seat_allocations, [:allocated_seat_id], :unique => false, :name => :index_seat_allocations_on_allocated_seat_id
73
- add_foreign_key :sessions, :cinemas, :column => :cinema_id, :primary_key => :cinema_id, :on_delete => :cascade
74
- add_index :sessions, [:cinema_id], :unique => false, :name => :index_sessions_on_cinema_id
75
- add_foreign_key :sessions, :films, :column => :film_id, :primary_key => :film_id, :on_delete => :cascade
76
- add_index :sessions, [:film_id], :unique => false, :name => :index_sessions_on_film_id
63
+ add_foreign_key :bookings, :people, column: :person_id, primary_key: :person_id, on_delete: :cascade
64
+ add_index :bookings, [:person_id], unique: false, name: :index_bookings_on_person_id
65
+ add_foreign_key :bookings, :sessions, column: :session_id, primary_key: :session_id, on_delete: :cascade
66
+ add_index :bookings, [:session_id], unique: false, name: :index_bookings_on_session_id
67
+ add_foreign_key :seats, :cinemas, column: :row_cinema_id, primary_key: :cinema_id, on_delete: :cascade
68
+ add_index :seats, [:row_cinema_id], unique: false, name: :index_seats_on_row_cinema_id
69
+ add_foreign_key :seat_allocations, :bookings, column: :booking_id, primary_key: :booking_id, on_delete: :cascade
70
+ add_index :seat_allocations, [:booking_id], unique: false, name: :index_seat_allocations_on_booking_id
71
+ add_foreign_key :seat_allocations, :seats, column: :allocated_seat_id, primary_key: :seat_id, on_delete: :cascade
72
+ add_index :seat_allocations, [:allocated_seat_id], unique: false, name: :index_seat_allocations_on_allocated_seat_id
73
+ add_foreign_key :sessions, :cinemas, column: :cinema_id, primary_key: :cinema_id, on_delete: :cascade
74
+ add_index :sessions, [:cinema_id], unique: false, name: :index_sessions_on_cinema_id
75
+ add_foreign_key :sessions, :films, column: :film_id, primary_key: :film_id, on_delete: :cascade
76
+ add_index :sessions, [:film_id], unique: false, name: :index_sessions_on_film_id
77
77
  end
78
78
  end
@@ -1,132 +1,132 @@
1
1
  #
2
- # schema.rb auto-generated using ActiveFacts for CinemaTickets on 2015-07-08
2
+ # schema.rb auto-generated using ActiveFacts for CinemaTickets on 2017-10-24
3
3
  #
4
4
 
5
5
  ActiveRecord::Base.logger = Logger.new(STDOUT)
6
- ActiveRecord::Schema.define(:version => 20150708011547) do
6
+ ActiveRecord::Schema.define(version: 20171024174748) do
7
7
  enable_extension 'pgcrypto' unless extension_enabled?('pgcrypto')
8
- create_table "allocatable_cinema_sections", :id => false, :force => true do |t|
9
- t.column "allocatable_cinema_section_id", :primary_key, :null => false
10
- t.column "cinema_id", :integer, :null => false
11
- t.column "section_name", :string, :null => false
8
+ create_table "allocatable_cinema_sections", id: false, force: true do |t|
9
+ t.column "allocatable_cinema_section_id", :primary_key, null: false
10
+ t.column "cinema_id", :integer, null: false
11
+ t.column "section_name", :string, null: false
12
12
  end
13
13
 
14
- add_index "allocatable_cinema_sections", ["cinema_id", "section_name"], :name => :index_allocatable_cinema_sections_on_cinema_id_section_name, :unique => true
15
-
16
- create_table "bookings", :id => false, :force => true do |t|
17
- t.column "booking_id", :primary_key, :null => false
18
- t.column "person_id", :integer, :null => false
19
- t.column "session_id", :integer, :null => false
20
- t.column "address_text", :text, :null => true
21
- t.column "booking_nr", :integer, :limit => 32, :null => false
22
- t.column "collection_code", :integer, :limit => 32, :null => true
23
- t.column "number", :integer, :limit => 16, :null => false
24
- t.column "section_name", :string, :null => true
25
- t.column "tickets_for_have_been_issued", :boolean, :null => true
14
+ add_index "allocatable_cinema_sections", ["cinema_id", "section_name"], name: :index_allocatable_cinema_sections_on_cinema_id_section_name, unique: true
15
+
16
+ create_table "bookings", id: false, force: true do |t|
17
+ t.column "booking_id", :primary_key, null: false
18
+ t.column "person_id", :integer, null: false
19
+ t.column "session_id", :integer, null: false
20
+ t.column "address_text", :text, null: true
21
+ t.column "booking_nr", :integer, limit: 32, null: false
22
+ t.column "collection_code", :integer, limit: 32, null: true
23
+ t.column "number", :integer, limit: 16, null: false
24
+ t.column "section_name", :string, null: true
25
+ t.column "tickets_for_have_been_issued", :boolean, null: true
26
26
  end
27
27
 
28
- add_index "bookings", ["booking_nr"], :name => :index_bookings_on_booking_nr, :unique => true
29
- add_index "bookings", ["person_id", "session_id"], :name => :index_bookings_on_person_id_session_id, :unique => true
28
+ add_index "bookings", ["booking_nr"], name: :index_bookings_on_booking_nr, unique: true
29
+ add_index "bookings", ["person_id", "session_id"], name: :index_bookings_on_person_id_session_id, unique: true
30
30
 
31
- create_table "cinemas", :id => false, :force => true do |t|
32
- t.column "cinema_id", :primary_key, :null => false
33
- t.column "name", :string, :null => false
31
+ create_table "cinemas", id: false, force: true do |t|
32
+ t.column "cinema_id", :primary_key, null: false
33
+ t.column "name", :string, null: false
34
34
  end
35
35
 
36
- add_index "cinemas", ["name"], :name => :index_cinemas_on_name, :unique => true
36
+ add_index "cinemas", ["name"], name: :index_cinemas_on_name, unique: true
37
37
 
38
- create_table "films", :id => false, :force => true do |t|
39
- t.column "film_id", :primary_key, :null => false
40
- t.column "name", :string, :null => false
41
- t.column "year_nr", :integer, :limit => 32, :null => true
38
+ create_table "films", id: false, force: true do |t|
39
+ t.column "film_id", :primary_key, null: false
40
+ t.column "name", :string, null: false
41
+ t.column "year_nr", :integer, limit: 32, null: true
42
42
  end
43
43
 
44
- add_index "films", ["name", "year_nr"], :name => :index_films_on_name_year_nr
44
+ add_index "films", ["name", "year_nr"], name: :index_films_on_name_year_nr
45
45
 
46
- create_table "people", :id => false, :force => true do |t|
47
- t.column "person_id", :primary_key, :null => false
48
- t.column "encrypted_password", :string, :null => true
49
- t.column "login_name", :string, :null => true
46
+ create_table "people", id: false, force: true do |t|
47
+ t.column "person_id", :primary_key, null: false
48
+ t.column "encrypted_password", :string, null: true
49
+ t.column "login_name", :string, null: true
50
50
  end
51
51
 
52
- add_index "people", ["login_name"], :name => :index_people_on_login_name
52
+ add_index "people", ["login_name"], name: :index_people_on_login_name
53
53
 
54
- create_table "places_paids", :id => false, :force => true do |t|
55
- t.column "places_paid_id", :primary_key, :null => false
56
- t.column "booking_id", :integer, :null => false
57
- t.column "number", :integer, :limit => 16, :null => false
58
- t.column "payment_method_code", :string, :null => false
54
+ create_table "places_paids", id: false, force: true do |t|
55
+ t.column "places_paid_id", :primary_key, null: false
56
+ t.column "booking_id", :integer, null: false
57
+ t.column "number", :integer, limit: 16, null: false
58
+ t.column "payment_method_code", :string, null: false
59
59
  end
60
60
 
61
- add_index "places_paids", ["booking_id", "payment_method_code"], :name => :index_places_paids_on_booking_id_payment_method_code, :unique => true
61
+ add_index "places_paids", ["booking_id", "payment_method_code"], name: :index_places_paids_on_booking_id_payment_method_code, unique: true
62
62
 
63
- create_table "seats", :id => false, :force => true do |t|
64
- t.column "seat_id", :primary_key, :null => false
65
- t.column "row_cinema_id", :integer, :null => false
66
- t.column "row_nr", :string, :limit => 2, :null => false
67
- t.column "seat_number", :integer, :limit => 16, :null => false
68
- t.column "section_name", :string, :null => true
63
+ create_table "seats", id: false, force: true do |t|
64
+ t.column "seat_id", :primary_key, null: false
65
+ t.column "row_cinema_id", :integer, null: false
66
+ t.column "row_nr", :string, limit: 2, null: false
67
+ t.column "seat_number", :integer, limit: 16, null: false
68
+ t.column "section_name", :string, null: true
69
69
  end
70
70
 
71
- add_index "seats", ["row_cinema_id", "row_nr", "seat_number"], :name => :index_seats_on_row_cinema_id_row_nr_seat_number, :unique => true
71
+ add_index "seats", ["row_cinema_id", "row_nr", "seat_number"], name: :index_seats_on_row_cinema_id_row_nr_seat_number, unique: true
72
72
 
73
- create_table "seat_allocations", :id => false, :force => true do |t|
74
- t.column "booking_id", :integer, :null => false
75
- t.column "allocated_seat_id", :integer, :null => false
73
+ create_table "seat_allocations", id: false, force: true do |t|
74
+ t.column "booking_id", :integer, null: false
75
+ t.column "allocated_seat_id", :integer, null: false
76
76
  end
77
77
 
78
- add_index "seat_allocations", ["booking_id", "allocated_seat_id"], :name => :index_seat_allocations_on_booking_id_allocated_seat_id, :unique => true
79
-
80
- create_table "sessions", :id => false, :force => true do |t|
81
- t.column "session_id", :primary_key, :null => false
82
- t.column "cinema_id", :integer, :null => false
83
- t.column "film_id", :integer, :null => false
84
- t.column "is_high_demand", :boolean, :null => true
85
- t.column "session_time_day", :integer, :limit => 32, :null => false
86
- t.column "session_time_hour", :integer, :limit => 32, :null => false
87
- t.column "session_time_minute", :integer, :limit => 32, :null => false
88
- t.column "session_time_month_nr", :integer, :limit => 32, :null => false
89
- t.column "session_time_year_nr", :integer, :limit => 32, :null => false
90
- t.column "uses_allocated_seating", :boolean, :null => true
78
+ add_index "seat_allocations", ["booking_id", "allocated_seat_id"], name: :index_seat_allocations_on_booking_id_allocated_seat_id, unique: true
79
+
80
+ create_table "sessions", id: false, force: true do |t|
81
+ t.column "session_id", :primary_key, null: false
82
+ t.column "cinema_id", :integer, null: false
83
+ t.column "film_id", :integer, null: false
84
+ t.column "is_high_demand", :boolean, null: true
85
+ t.column "session_time_day", :integer, limit: 32, null: false
86
+ t.column "session_time_hour", :integer, limit: 32, null: false
87
+ t.column "session_time_minute", :integer, limit: 32, null: false
88
+ t.column "session_time_month_nr", :integer, limit: 32, null: false
89
+ t.column "session_time_year_nr", :integer, limit: 32, null: false
90
+ t.column "uses_allocated_seating", :boolean, null: true
91
91
  end
92
92
 
93
- add_index "sessions", ["cinema_id", "session_time_year_nr", "session_time_month_nr", "session_time_day", "session_time_hour", "session_time_minute"], :name => :index_sessions_on_cinema_id_session_time_year_nr_sess__7a05f3be, :unique => true
94
-
95
- create_table "ticket_pricings", :id => false, :force => true do |t|
96
- t.column "ticket_pricing_id", :primary_key, :null => false
97
- t.column "cinema_id", :integer, :null => false
98
- t.column "high_demand", :boolean, :null => false
99
- t.column "price", :decimal, :null => false
100
- t.column "section_name", :string, :null => false
101
- t.column "session_time_day", :integer, :limit => 32, :null => false
102
- t.column "session_time_hour", :integer, :limit => 32, :null => false
103
- t.column "session_time_minute", :integer, :limit => 32, :null => false
104
- t.column "session_time_month_nr", :integer, :limit => 32, :null => false
105
- t.column "session_time_year_nr", :integer, :limit => 32, :null => false
93
+ add_index "sessions", ["cinema_id", "session_time_year_nr", "session_time_month_nr", "session_time_day", "session_time_hour", "session_time_minute"], name: :index_sessions_on_cinema_id_session_time_year_nr_sess__7a05f3be, unique: true
94
+
95
+ create_table "ticket_categories", id: false, force: true do |t|
96
+ t.column "ticket_category_id", :primary_key, null: false
97
+ t.column "cinema_id", :integer, null: false
98
+ t.column "has_high_demand", :boolean, null: true
99
+ t.column "price", :decimal, null: true
100
+ t.column "section_name", :string, null: false
101
+ t.column "session_time_day", :integer, limit: 32, null: false
102
+ t.column "session_time_hour", :integer, limit: 32, null: false
103
+ t.column "session_time_minute", :integer, limit: 32, null: false
104
+ t.column "session_time_month_nr", :integer, limit: 32, null: false
105
+ t.column "session_time_year_nr", :integer, limit: 32, null: false
106
106
  end
107
107
 
108
- add_index "ticket_pricings", ["session_time_year_nr", "session_time_month_nr", "session_time_day", "session_time_hour", "session_time_minute", "cinema_id", "section_name", "high_demand"], :name => :index_ticket_pricings_on_session_time_year_nr_session__181a38a0, :unique => true
108
+ add_index "ticket_categories", ["cinema_id", "session_time_year_nr", "session_time_month_nr", "session_time_day", "session_time_hour", "session_time_minute", "section_name", "has_high_demand"], name: :index_ticket_categories_on_cinema_id_session_time_yea__35c4b14d
109
109
 
110
110
  unless ENV["EXCLUDE_FKS"]
111
- add_foreign_key :allocatable_cinema_sections, :cinemas, :column => :cinema_id, :primary_key => :cinema_id, :on_delete => :cascade
112
- add_index :allocatable_cinema_sections, [:cinema_id], :unique => false, :name => :index_allocatable_cinema_sections_on_cinema_id
113
- add_foreign_key :bookings, :people, :column => :person_id, :primary_key => :person_id, :on_delete => :cascade
114
- add_index :bookings, [:person_id], :unique => false, :name => :index_bookings_on_person_id
115
- add_foreign_key :bookings, :sessions, :column => :session_id, :primary_key => :session_id, :on_delete => :cascade
116
- add_index :bookings, [:session_id], :unique => false, :name => :index_bookings_on_session_id
117
- add_foreign_key :places_paids, :bookings, :column => :booking_id, :primary_key => :booking_id, :on_delete => :cascade
118
- add_index :places_paids, [:booking_id], :unique => false, :name => :index_places_paids_on_booking_id
119
- add_foreign_key :seats, :cinemas, :column => :row_cinema_id, :primary_key => :cinema_id, :on_delete => :cascade
120
- add_index :seats, [:row_cinema_id], :unique => false, :name => :index_seats_on_row_cinema_id
121
- add_foreign_key :seat_allocations, :bookings, :column => :booking_id, :primary_key => :booking_id, :on_delete => :cascade
122
- add_index :seat_allocations, [:booking_id], :unique => false, :name => :index_seat_allocations_on_booking_id
123
- add_foreign_key :seat_allocations, :seats, :column => :allocated_seat_id, :primary_key => :seat_id, :on_delete => :cascade
124
- add_index :seat_allocations, [:allocated_seat_id], :unique => false, :name => :index_seat_allocations_on_allocated_seat_id
125
- add_foreign_key :sessions, :cinemas, :column => :cinema_id, :primary_key => :cinema_id, :on_delete => :cascade
126
- add_index :sessions, [:cinema_id], :unique => false, :name => :index_sessions_on_cinema_id
127
- add_foreign_key :sessions, :films, :column => :film_id, :primary_key => :film_id, :on_delete => :cascade
128
- add_index :sessions, [:film_id], :unique => false, :name => :index_sessions_on_film_id
129
- add_foreign_key :ticket_pricings, :cinemas, :column => :cinema_id, :primary_key => :cinema_id, :on_delete => :cascade
130
- add_index :ticket_pricings, [:cinema_id], :unique => false, :name => :index_ticket_pricings_on_cinema_id
111
+ add_foreign_key :allocatable_cinema_sections, :cinemas, column: :cinema_id, primary_key: :cinema_id, on_delete: :cascade
112
+ add_index :allocatable_cinema_sections, [:cinema_id], unique: false, name: :index_allocatable_cinema_sections_on_cinema_id
113
+ add_foreign_key :bookings, :people, column: :person_id, primary_key: :person_id, on_delete: :cascade
114
+ add_index :bookings, [:person_id], unique: false, name: :index_bookings_on_person_id
115
+ add_foreign_key :bookings, :sessions, column: :session_id, primary_key: :session_id, on_delete: :cascade
116
+ add_index :bookings, [:session_id], unique: false, name: :index_bookings_on_session_id
117
+ add_foreign_key :places_paids, :bookings, column: :booking_id, primary_key: :booking_id, on_delete: :cascade
118
+ add_index :places_paids, [:booking_id], unique: false, name: :index_places_paids_on_booking_id
119
+ add_foreign_key :seats, :cinemas, column: :row_cinema_id, primary_key: :cinema_id, on_delete: :cascade
120
+ add_index :seats, [:row_cinema_id], unique: false, name: :index_seats_on_row_cinema_id
121
+ add_foreign_key :seat_allocations, :bookings, column: :booking_id, primary_key: :booking_id, on_delete: :cascade
122
+ add_index :seat_allocations, [:booking_id], unique: false, name: :index_seat_allocations_on_booking_id
123
+ add_foreign_key :seat_allocations, :seats, column: :allocated_seat_id, primary_key: :seat_id, on_delete: :cascade
124
+ add_index :seat_allocations, [:allocated_seat_id], unique: false, name: :index_seat_allocations_on_allocated_seat_id
125
+ add_foreign_key :sessions, :cinemas, column: :cinema_id, primary_key: :cinema_id, on_delete: :cascade
126
+ add_index :sessions, [:cinema_id], unique: false, name: :index_sessions_on_cinema_id
127
+ add_foreign_key :sessions, :films, column: :film_id, primary_key: :film_id, on_delete: :cascade
128
+ add_index :sessions, [:film_id], unique: false, name: :index_sessions_on_film_id
129
+ add_foreign_key :ticket_categories, :cinemas, column: :cinema_id, primary_key: :cinema_id, on_delete: :cascade
130
+ add_index :ticket_categories, [:cinema_id], unique: false, name: :index_ticket_categories_on_cinema_id
131
131
  end
132
132
  end