Переглянути джерело

sql script; fixed env; fixed nuget.config; added dbdiff script

tags/v1.0
Robin Thoni 7 роки тому
джерело
коміт
ea62e4db25

+ 86
- 155
backend/WebSem/.idea/.idea.WebSem/.idea/workspace.xml Переглянути файл

@@ -1,7 +1,9 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4
-    <list default="true" id="8d054e21-e284-419c-acba-f672639639a4" name="Default" comment="" />
4
+    <list default="true" id="8d054e21-e284-419c-acba-f672639639a4" name="Default" comment="">
5
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/.idea.WebSem/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/.idea.WebSem/.idea/workspace.xml" />
6
+    </list>
5 7
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
6 8
     <option name="TRACKING_ENABLED" value="true" />
7 9
     <option name="SHOW_DIALOG" value="false" />
@@ -38,29 +40,7 @@
38 40
           <provider selected="true" editor-type-id="text-editor">
39 41
             <state relative-caret-position="498">
40 42
               <caret line="57" column="87" lean-forward="false" selection-start-line="57" selection-start-column="87" selection-end-line="57" selection-end-column="87" />
41
-              <folding>
42
-                <marker date="1487814627815" expanded="true" signature="6:307" ph="..." />
43
-                <marker date="1487814627815" expanded="true" signature="342:4297" ph="{...}" />
44
-                <marker date="1487814627815" expanded="true" signature="478:4295" ph="{...}" />
45
-                <marker date="1487814627815" expanded="true" signature="687:707" ph="{...}" />
46
-                <marker date="1487814627815" expanded="true" signature="759:802" ph="{...}" />
47
-                <marker date="1487814627815" expanded="true" signature="911:1006" ph="{...}" />
48
-                <marker date="1487814627815" expanded="true" signature="1116:1183" ph="{...}" />
49
-                <marker date="1487814627815" expanded="true" signature="1252:1304" ph="{...}" />
50
-                <marker date="1487814627815" expanded="true" signature="1364:1602" ph="{...}" />
51
-                <marker date="1487814627815" expanded="true" signature="1500:1557" ph="{...}" />
52
-                <marker date="1487814627815" expanded="true" signature="1703:2107" ph="{...}" />
53
-                <marker date="1487814627815" expanded="true" signature="2184:2708" ph="{...}" />
54
-                <marker date="1487814627815" expanded="true" signature="2239:2697" ph="{...}" />
55
-                <marker date="1487814627815" expanded="true" signature="2501:2640" ph="{...}" />
56
-                <marker date="1487814627815" expanded="true" signature="2799:2958" ph="{...}" />
57
-                <marker date="1487814627815" expanded="true" signature="3101:4163" ph="{...}" />
58
-                <marker date="1487814627815" expanded="true" signature="3276:3362" ph="{...}" />
59
-                <marker date="1487814627815" expanded="true" signature="3422:3655" ph="{...}" />
60
-                <marker date="1487814627815" expanded="true" signature="3809:4109" ph="{...}" />
61
-                <marker date="1487814627815" expanded="true" signature="3905:4093" ph="{...}" />
62
-                <marker date="1487814627815" expanded="true" signature="4235:4289" ph="{...}" />
63
-              </folding>
43
+              <folding />
64 44
             </state>
65 45
           </provider>
66 46
         </entry>
@@ -70,12 +50,7 @@
70 50
           <provider selected="true" editor-type-id="text-editor">
71 51
             <state relative-caret-position="0">
72 52
               <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
73
-              <folding>
74
-                <marker date="1487088044437" expanded="true" signature="0:654" ph="{...}" />
75
-                <marker date="1487088044437" expanded="true" signature="17:459" ph="{...}" />
76
-                <marker date="1487088044437" expanded="true" signature="71:453" ph="{...}" />
77
-                <marker date="1487088044437" expanded="true" signature="486:650" ph="{...}" />
78
-              </folding>
53
+              <folding />
79 54
             </state>
80 55
           </provider>
81 56
         </entry>
@@ -85,27 +60,50 @@
85 60
           <provider selected="true" editor-type-id="text-editor">
86 61
             <state relative-caret-position="90">
87 62
               <caret line="5" column="36" lean-forward="false" selection-start-line="5" selection-start-column="25" selection-end-line="5" selection-end-column="36" />
88
-              <folding>
89
-                <marker date="1487541008405" expanded="true" signature="6:74" ph="..." />
90
-                <marker date="1487541008405" expanded="true" signature="109:1246" ph="{...}" />
91
-                <marker date="1487541008405" expanded="true" signature="160:1244" ph="{...}" />
92
-                <marker date="1487541008405" expanded="true" signature="234:254" ph="{...}" />
93
-                <marker date="1487541008405" expanded="true" signature="330:1073" ph="{...}" />
94
-              </folding>
63
+              <folding />
95 64
             </state>
96 65
           </provider>
97 66
         </entry>
98 67
       </file>
99
-      <file leaf-file-name="appsettings.Development.json" pinned="false" current-in-tab="true">
68
+      <file leaf-file-name="appsettings.Development.json" pinned="false" current-in-tab="false">
100 69
         <entry file="file://$PROJECT_DIR$/WebApiWebSem/appsettings.Development.json">
101 70
           <provider selected="true" editor-type-id="text-editor">
102
-            <state relative-caret-position="234">
103
-              <caret line="13" column="17" lean-forward="false" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
71
+            <state relative-caret-position="252">
72
+              <caret line="14" column="1" lean-forward="false" selection-start-line="14" selection-start-column="1" selection-end-line="14" selection-end-column="1" />
73
+              <folding />
74
+            </state>
75
+          </provider>
76
+        </entry>
77
+      </file>
78
+      <file leaf-file-name="NuGet.Config" pinned="false" current-in-tab="true">
79
+        <entry file="file://$PROJECT_DIR$/WebApiWebSem/NuGet.Config">
80
+          <provider selected="true" editor-type-id="text-editor">
81
+            <state relative-caret-position="108">
82
+              <caret line="6" column="16" lean-forward="false" selection-start-line="6" selection-start-column="16" selection-end-line="6" selection-end-column="16" />
83
+              <folding />
84
+            </state>
85
+          </provider>
86
+        </entry>
87
+      </file>
88
+      <file leaf-file-name="project.json" pinned="false" current-in-tab="false">
89
+        <entry file="file://$PROJECT_DIR$/WebApiWebSem/project.json">
90
+          <provider selected="true" editor-type-id="text-editor">
91
+            <state relative-caret-position="54">
92
+              <caret line="3" column="32" lean-forward="false" selection-start-line="3" selection-start-column="32" selection-end-line="3" selection-end-column="32" />
104 93
               <folding>
105
-                <marker date="1487815982463" expanded="true" signature="0:490" ph="{...}" />
106
-                <marker date="1487815982463" expanded="true" signature="17:297" ph="{...}" />
107
-                <marker date="1487815982463" expanded="true" signature="71:291" ph="{...}" />
108
-                <marker date="1487815982463" expanded="true" signature="324:468" ph="{...}" />
94
+                <marker date="1487108425286" expanded="true" signature="0:1500" ph="{...}" />
95
+                <marker date="1487108425286" expanded="true" signature="20:777" ph="{...}" />
96
+                <marker date="1487108425286" expanded="true" signature="87:155" ph="{...}" />
97
+                <marker date="1487108425286" expanded="true" signature="791:875" ph="{...}" />
98
+                <marker date="1487108425286" expanded="true" signature="894:1006" ph="{...}" />
99
+                <marker date="1487108425286" expanded="true" signature="917:1002" ph="{...}" />
100
+                <marker date="1487108425286" expanded="true" signature="936:996" ph="[...]" />
101
+                <marker date="1487108425286" expanded="true" signature="1027:1128" ph="{...}" />
102
+                <marker date="1487108425286" expanded="true" signature="1151:1219" ph="{...}" />
103
+                <marker date="1487108425286" expanded="true" signature="1177:1215" ph="{...}" />
104
+                <marker date="1487108425286" expanded="true" signature="1242:1353" ph="{...}" />
105
+                <marker date="1487108425286" expanded="true" signature="1259:1349" ph="[...]" />
106
+                <marker date="1487108425286" expanded="true" signature="1369:1498" ph="{...}" />
109 107
               </folding>
110 108
             </state>
111 109
           </provider>
@@ -119,7 +117,6 @@
119 117
   <component name="IdeDocumentHistory">
120 118
     <option name="CHANGED_PATHS">
121 119
       <list>
122
-        <option value="$PROJECT_DIR$/WebApiWebSem/NuGet.Config" />
123 120
         <option value="$PROJECT_DIR$/WebApiWebSem/DataAccess/code-from-ds/Models.twig" />
124 121
         <option value="$PROJECT_DIR$/WebApiWebSem/DataAccess/code-from-ds/DataSource.twig" />
125 122
         <option value="$PROJECT_DIR$/WebApiWebSem/appsettings.json" />
@@ -155,6 +152,7 @@
155 152
         <option value="$PROJECT_DIR$/WebApiWebSem/DataAccess/WsDbContextPartial.cs" />
156 153
         <option value="$PROJECT_DIR$/WebApiWebSem/DataAccess/ArticlesDataAccess.cs" />
157 154
         <option value="$PROJECT_DIR$/WebApiWebSem/appsettings.Development.json" />
155
+        <option value="$PROJECT_DIR$/WebApiWebSem/NuGet.Config" />
158 156
       </list>
159 157
     </option>
160 158
   </component>
@@ -302,12 +300,12 @@
302 300
       <workItem from="1487345029610" duration="5634000" />
303 301
       <workItem from="1487441650798" duration="14018000" />
304 302
       <workItem from="1487528667649" duration="13931000" />
305
-      <workItem from="1487802391451" duration="7822000" />
303
+      <workItem from="1487802391451" duration="9085000" />
306 304
     </task>
307 305
     <servers />
308 306
   </component>
309 307
   <component name="TimeTrackingManager">
310
-    <option name="totallyTimeSpent" value="48619000" />
308
+    <option name="totallyTimeSpent" value="49882000" />
311 309
   </component>
312 310
   <component name="TodoView">
313 311
     <todo-panel id="selected-file">
@@ -320,21 +318,21 @@
320 318
   </component>
321 319
   <component name="ToolWindowManager">
322 320
     <frame x="0" y="0" width="1920" height="1061" extended-state="0" />
323
-    <editor active="true" />
324 321
     <layout>
325
-      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
322
+      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32908705" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
326 323
       <window_info id="Errors In Solution" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32976446" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
327 324
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="true" content_ui="tabs" />
328 325
       <window_info id="Unit Tests" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.26963907" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
329 326
       <window_info id="Run Dashboard" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
330 327
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
331
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2282378" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
332
-      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.19745223" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
333
-      <window_info id="NuGet" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24258475" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
328
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2282378" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
329
+      <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.19745223" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
330
+      <window_info id="NuGet" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24203822" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
334 331
       <window_info id="Change Signature" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
335 332
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.21841542" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
336 333
       <window_info id="Build" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32908705" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
337 334
       <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.21199143" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
335
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
338 336
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
339 337
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39915073" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
340 338
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
@@ -344,7 +342,6 @@
344 342
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
345 343
       <window_info id="UnitTesting" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32908705" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
346 344
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
347
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
348 345
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
349 346
     </layout>
350 347
   </component>
@@ -362,29 +359,7 @@
362 359
       <provider selected="true" editor-type-id="text-editor">
363 360
         <state relative-caret-position="1854">
364 361
           <caret line="103" column="17" lean-forward="true" selection-start-line="103" selection-start-column="17" selection-end-line="103" selection-end-column="17" />
365
-          <folding>
366
-            <marker date="1487814627815" expanded="true" signature="6:307" ph="..." />
367
-            <marker date="1487814627815" expanded="true" signature="342:4297" ph="{...}" />
368
-            <marker date="1487814627815" expanded="true" signature="478:4295" ph="{...}" />
369
-            <marker date="1487814627815" expanded="true" signature="687:707" ph="{...}" />
370
-            <marker date="1487814627815" expanded="true" signature="759:802" ph="{...}" />
371
-            <marker date="1487814627815" expanded="true" signature="911:1006" ph="{...}" />
372
-            <marker date="1487814627815" expanded="true" signature="1116:1183" ph="{...}" />
373
-            <marker date="1487814627815" expanded="true" signature="1252:1304" ph="{...}" />
374
-            <marker date="1487814627815" expanded="true" signature="1364:1602" ph="{...}" />
375
-            <marker date="1487814627815" expanded="true" signature="1500:1557" ph="{...}" />
376
-            <marker date="1487814627815" expanded="true" signature="1703:2107" ph="{...}" />
377
-            <marker date="1487814627815" expanded="true" signature="2184:2708" ph="{...}" />
378
-            <marker date="1487814627815" expanded="true" signature="2239:2697" ph="{...}" />
379
-            <marker date="1487814627815" expanded="true" signature="2501:2640" ph="{...}" />
380
-            <marker date="1487814627815" expanded="true" signature="2799:2958" ph="{...}" />
381
-            <marker date="1487814627815" expanded="true" signature="3101:4163" ph="{...}" />
382
-            <marker date="1487814627815" expanded="true" signature="3276:3362" ph="{...}" />
383
-            <marker date="1487814627815" expanded="true" signature="3422:3655" ph="{...}" />
384
-            <marker date="1487814627815" expanded="true" signature="3809:4109" ph="{...}" />
385
-            <marker date="1487814627815" expanded="true" signature="3905:4093" ph="{...}" />
386
-            <marker date="1487814627815" expanded="true" signature="4235:4289" ph="{...}" />
387
-          </folding>
362
+          <folding />
388 363
         </state>
389 364
       </provider>
390 365
     </entry>
@@ -392,29 +367,7 @@
392 367
       <provider selected="true" editor-type-id="text-editor">
393 368
         <state relative-caret-position="0">
394 369
           <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
395
-          <folding>
396
-            <marker date="1487814627815" expanded="true" signature="6:307" ph="..." />
397
-            <marker date="1487814627815" expanded="true" signature="342:4297" ph="{...}" />
398
-            <marker date="1487814627815" expanded="true" signature="478:4295" ph="{...}" />
399
-            <marker date="1487814627815" expanded="true" signature="687:707" ph="{...}" />
400
-            <marker date="1487814627815" expanded="true" signature="759:802" ph="{...}" />
401
-            <marker date="1487814627815" expanded="true" signature="911:1006" ph="{...}" />
402
-            <marker date="1487814627815" expanded="true" signature="1116:1183" ph="{...}" />
403
-            <marker date="1487814627815" expanded="true" signature="1252:1304" ph="{...}" />
404
-            <marker date="1487814627815" expanded="true" signature="1364:1602" ph="{...}" />
405
-            <marker date="1487814627815" expanded="true" signature="1500:1557" ph="{...}" />
406
-            <marker date="1487814627815" expanded="true" signature="1703:2107" ph="{...}" />
407
-            <marker date="1487814627815" expanded="true" signature="2184:2708" ph="{...}" />
408
-            <marker date="1487814627815" expanded="true" signature="2239:2697" ph="{...}" />
409
-            <marker date="1487814627815" expanded="true" signature="2501:2640" ph="{...}" />
410
-            <marker date="1487814627815" expanded="true" signature="2799:2958" ph="{...}" />
411
-            <marker date="1487814627815" expanded="true" signature="3101:4163" ph="{...}" />
412
-            <marker date="1487814627815" expanded="true" signature="3276:3362" ph="{...}" />
413
-            <marker date="1487814627815" expanded="true" signature="3422:3655" ph="{...}" />
414
-            <marker date="1487814627815" expanded="true" signature="3809:4109" ph="{...}" />
415
-            <marker date="1487814627815" expanded="true" signature="3905:4093" ph="{...}" />
416
-            <marker date="1487814627815" expanded="true" signature="4235:4289" ph="{...}" />
417
-          </folding>
370
+          <folding />
418 371
         </state>
419 372
       </provider>
420 373
     </entry>
@@ -496,13 +449,6 @@
496 449
       </provider>
497 450
     </entry>
498 451
     <entry file="file://$PROJECT_DIR$/WebApiWebSem/DataAccess/Models/lu_entities_history.cs" />
499
-    <entry file="file://$PROJECT_DIR$/WebApiWebSem/NuGet.Config">
500
-      <provider selected="true" editor-type-id="text-editor">
501
-        <state relative-caret-position="0">
502
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
503
-        </state>
504
-      </provider>
505
-    </entry>
506 452
     <entry file="file://$PROJECT_DIR$/WebApiWebSem/Middleware/SleepMiddleware.cs">
507 453
       <provider selected="true" editor-type-id="text-editor">
508 454
         <state relative-caret-position="234">
@@ -518,13 +464,6 @@
518 464
       </provider>
519 465
     </entry>
520 466
     <entry file="file://$PROJECT_DIR$/WebApiWebSem/Controllers/ValuesController.cs" />
521
-    <entry file="file://$PROJECT_DIR$/WebApiWebSem/project.json">
522
-      <provider selected="true" editor-type-id="text-editor">
523
-        <state relative-caret-position="324">
524
-          <caret line="18" column="4" lean-forward="false" selection-start-line="18" selection-start-column="4" selection-end-line="18" selection-end-column="4" />
525
-        </state>
526
-      </provider>
527
-    </entry>
528 467
     <entry file="file://$PROJECT_DIR$/WebApiWebSem/DataAccess/code-from-ds/DataSource.twig">
529 468
       <provider selected="true" editor-type-id="text-editor">
530 469
         <state relative-caret-position="0">
@@ -707,13 +646,7 @@
707 646
       <provider selected="true" editor-type-id="text-editor">
708 647
         <state relative-caret-position="90">
709 648
           <caret line="5" column="36" lean-forward="false" selection-start-line="5" selection-start-column="25" selection-end-line="5" selection-end-column="36" />
710
-          <folding>
711
-            <marker date="1487541008405" expanded="true" signature="6:74" ph="..." />
712
-            <marker date="1487541008405" expanded="true" signature="109:1246" ph="{...}" />
713
-            <marker date="1487541008405" expanded="true" signature="160:1244" ph="{...}" />
714
-            <marker date="1487541008405" expanded="true" signature="234:254" ph="{...}" />
715
-            <marker date="1487541008405" expanded="true" signature="330:1073" ph="{...}" />
716
-          </folding>
649
+          <folding />
717 650
         </state>
718 651
       </provider>
719 652
     </entry>
@@ -733,29 +666,7 @@
733 666
       <provider selected="true" editor-type-id="text-editor">
734 667
         <state relative-caret-position="498">
735 668
           <caret line="57" column="87" lean-forward="false" selection-start-line="57" selection-start-column="87" selection-end-line="57" selection-end-column="87" />
736
-          <folding>
737
-            <marker date="1487814627815" expanded="true" signature="6:307" ph="..." />
738
-            <marker date="1487814627815" expanded="true" signature="342:4297" ph="{...}" />
739
-            <marker date="1487814627815" expanded="true" signature="478:4295" ph="{...}" />
740
-            <marker date="1487814627815" expanded="true" signature="687:707" ph="{...}" />
741
-            <marker date="1487814627815" expanded="true" signature="759:802" ph="{...}" />
742
-            <marker date="1487814627815" expanded="true" signature="911:1006" ph="{...}" />
743
-            <marker date="1487814627815" expanded="true" signature="1116:1183" ph="{...}" />
744
-            <marker date="1487814627815" expanded="true" signature="1252:1304" ph="{...}" />
745
-            <marker date="1487814627815" expanded="true" signature="1364:1602" ph="{...}" />
746
-            <marker date="1487814627815" expanded="true" signature="1500:1557" ph="{...}" />
747
-            <marker date="1487814627815" expanded="true" signature="1703:2107" ph="{...}" />
748
-            <marker date="1487814627815" expanded="true" signature="2184:2708" ph="{...}" />
749
-            <marker date="1487814627815" expanded="true" signature="2239:2697" ph="{...}" />
750
-            <marker date="1487814627815" expanded="true" signature="2501:2640" ph="{...}" />
751
-            <marker date="1487814627815" expanded="true" signature="2799:2958" ph="{...}" />
752
-            <marker date="1487814627815" expanded="true" signature="3101:4163" ph="{...}" />
753
-            <marker date="1487814627815" expanded="true" signature="3276:3362" ph="{...}" />
754
-            <marker date="1487814627815" expanded="true" signature="3422:3655" ph="{...}" />
755
-            <marker date="1487814627815" expanded="true" signature="3809:4109" ph="{...}" />
756
-            <marker date="1487814627815" expanded="true" signature="3905:4093" ph="{...}" />
757
-            <marker date="1487814627815" expanded="true" signature="4235:4289" ph="{...}" />
758
-          </folding>
669
+          <folding />
759 670
         </state>
760 671
       </provider>
761 672
     </entry>
@@ -763,27 +674,47 @@
763 674
       <provider selected="true" editor-type-id="text-editor">
764 675
         <state relative-caret-position="0">
765 676
           <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
766
-          <folding>
767
-            <marker date="1487088044437" expanded="true" signature="0:654" ph="{...}" />
768
-            <marker date="1487088044437" expanded="true" signature="17:459" ph="{...}" />
769
-            <marker date="1487088044437" expanded="true" signature="71:453" ph="{...}" />
770
-            <marker date="1487088044437" expanded="true" signature="486:650" ph="{...}" />
771
-          </folding>
677
+          <folding />
772 678
         </state>
773 679
       </provider>
774 680
     </entry>
775 681
     <entry file="file://$PROJECT_DIR$/WebApiWebSem/appsettings.Development.json">
776 682
       <provider selected="true" editor-type-id="text-editor">
777
-        <state relative-caret-position="234">
778
-          <caret line="13" column="17" lean-forward="false" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
683
+        <state relative-caret-position="252">
684
+          <caret line="14" column="1" lean-forward="false" selection-start-line="14" selection-start-column="1" selection-end-line="14" selection-end-column="1" />
685
+          <folding />
686
+        </state>
687
+      </provider>
688
+    </entry>
689
+    <entry file="file://$PROJECT_DIR$/WebApiWebSem/project.json">
690
+      <provider selected="true" editor-type-id="text-editor">
691
+        <state relative-caret-position="54">
692
+          <caret line="3" column="32" lean-forward="false" selection-start-line="3" selection-start-column="32" selection-end-line="3" selection-end-column="32" />
779 693
           <folding>
780
-            <marker date="1487815982463" expanded="true" signature="0:490" ph="{...}" />
781
-            <marker date="1487815982463" expanded="true" signature="17:297" ph="{...}" />
782
-            <marker date="1487815982463" expanded="true" signature="71:291" ph="{...}" />
783
-            <marker date="1487815982463" expanded="true" signature="324:468" ph="{...}" />
694
+            <marker date="1487108425286" expanded="true" signature="0:1500" ph="{...}" />
695
+            <marker date="1487108425286" expanded="true" signature="20:777" ph="{...}" />
696
+            <marker date="1487108425286" expanded="true" signature="87:155" ph="{...}" />
697
+            <marker date="1487108425286" expanded="true" signature="791:875" ph="{...}" />
698
+            <marker date="1487108425286" expanded="true" signature="894:1006" ph="{...}" />
699
+            <marker date="1487108425286" expanded="true" signature="917:1002" ph="{...}" />
700
+            <marker date="1487108425286" expanded="true" signature="936:996" ph="[...]" />
701
+            <marker date="1487108425286" expanded="true" signature="1027:1128" ph="{...}" />
702
+            <marker date="1487108425286" expanded="true" signature="1151:1219" ph="{...}" />
703
+            <marker date="1487108425286" expanded="true" signature="1177:1215" ph="{...}" />
704
+            <marker date="1487108425286" expanded="true" signature="1242:1353" ph="{...}" />
705
+            <marker date="1487108425286" expanded="true" signature="1259:1349" ph="[...]" />
706
+            <marker date="1487108425286" expanded="true" signature="1369:1498" ph="{...}" />
784 707
           </folding>
785 708
         </state>
786 709
       </provider>
787 710
     </entry>
711
+    <entry file="file://$PROJECT_DIR$/WebApiWebSem/NuGet.Config">
712
+      <provider selected="true" editor-type-id="text-editor">
713
+        <state relative-caret-position="108">
714
+          <caret line="6" column="16" lean-forward="false" selection-start-line="6" selection-start-column="16" selection-end-line="6" selection-end-column="16" />
715
+          <folding />
716
+        </state>
717
+      </provider>
718
+    </entry>
788 719
   </component>
789 720
 </project>

+ 7
- 0
backend/WebSem/NuGet.Config Переглянути файл

@@ -0,0 +1,7 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<configuration>
3
+    <packageSources>
4
+        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
5
+        <add key="rthoni" value="http://nuget.rthoni.com" protocolVersion="2" />
6
+    </packageSources>
7
+</configuration>

+ 23
- 0
dbdiff.sh Переглянути файл

@@ -0,0 +1,23 @@
1
+#! /usr/bin/env bash
2
+
3
+dir="$(mktemp -d)"
4
+
5
+docker_container="uqac-websem-postgresql"
6
+docker_db="websem"
7
+docker_user="websem"
8
+
9
+local_db="websem_project"
10
+local_user="dev"
11
+local_pwd="dev"
12
+
13
+pg_dump_options="-s -x --no-owner --inserts"
14
+
15
+if [ -t 1 ]
16
+then
17
+  echo "Working dir: ${dir}"
18
+fi
19
+
20
+cd "${dir}" &&
21
+docker exec -i "${docker_container}" pg_dump "${docker_db}" -U "${docker_user}" ${pg_dump_options} > docker &&
22
+PGPASSWORD="${local_pwd}" pg_dump "${local_db}" -U "${local_user}" -h 127.0.0.1 ${pg_dump_options} > local &&
23
+apgdiff docker local

+ 2
- 2
env Переглянути файл

@@ -1,7 +1,7 @@
1 1
 POSTGRES_HOST=postgresql.uqac-websem.internal.docker
2
-POSTGRES_USER=poweradmin
2
+POSTGRES_USER=websem
3 3
 POSTGRES_PASSWORD=pg_password
4
-POSTGRES_DB=poweradmin
4
+POSTGRES_DB=websem
5 5
 
6 6
 BACKEND_HOST=backend.uqac-websem.internal.docker
7 7
 BACKEND_PORT=8080

+ 61
- 0
postgresql/docker-entrypoint-initdb.d/10_websem-project.sql Переглянути файл

@@ -0,0 +1,61 @@
1
+
2
+CREATE OR REPLACE FUNCTION now_utc() RETURNS timestamp without time zone
3
+    LANGUAGE sql
4
+    AS $$
5
+SELECT now() at time zone 'utc'
6
+$$;
7
+
8
+CREATE OR REPLACE FUNCTION lu_on_row_update() RETURNS trigger
9
+    LANGUAGE plpgsql
10
+    AS $$
11
+BEGIN
12
+NEW.updated_at := now_utc();
13
+INSERT INTO lu_entities_history ("table", "data") VALUES(TG_TABLE_NAME, to_json(OLD));
14
+return NEW;
15
+END
16
+$$;
17
+
18
+CREATE OR REPLACE FUNCTION lu_on_row_update_no_history() RETURNS trigger
19
+    LANGUAGE plpgsql
20
+    AS $$
21
+
22
+BEGIN
23
+NEW.updated_at := now_utc();
24
+return NEW;
25
+END
26
+
27
+$$;
28
+
29
+
30
+
31
+CREATE TABLE articles (
32
+  id character varying(255) NOT NULL,
33
+  text text NOT NULL,
34
+  picture_url text,
35
+  picture_caption text,
36
+  type character varying(255) NOT NULL,
37
+  created_at timestamp without time zone DEFAULT now_utc() NOT NULL,
38
+  updated_at timestamp without time zone
39
+);
40
+
41
+CREATE TABLE articles_fields (
42
+  article_id character varying(255) NOT NULL,
43
+  property character varying(255) NOT NULL,
44
+  "value" text NOT NULL,
45
+  type character varying(255) NOT NULL
46
+);
47
+
48
+
49
+ALTER TABLE articles
50
+  ADD CONSTRAINT articles_pkey PRIMARY KEY (id);
51
+
52
+ALTER TABLE articles_fields
53
+  ADD CONSTRAINT articles_fields_pkey PRIMARY KEY (article_id, property);
54
+
55
+ALTER TABLE articles_fields
56
+  ADD CONSTRAINT articles_fields_article_id_fkey FOREIGN KEY (article_id) REFERENCES articles(id) ON UPDATE CASCADE ON DELETE CASCADE;
57
+
58
+CREATE TRIGGER articles_lu_on_row_update_no_history
59
+  BEFORE UPDATE ON articles
60
+  FOR EACH ROW
61
+  EXECUTE PROCEDURE lu_on_row_update_no_history();

Завантаження…
Відмінити
Зберегти