From 514c7d90ae10b120b5c327833ce1662e73383f70 Mon Sep 17 00:00:00 2001 From: Donal Cahill Date: Fri, 5 Jun 2015 04:07:50 +0100 Subject: [PATCH 01/13] Adding IP address to profile page. Fixes #33 --- app/views/users/partials/ip.blade.php | 3 +++ app/views/users/show.blade.php | 1 + public/css/lanager.css | 16 +++++++++++----- 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 app/views/users/partials/ip.blade.php diff --git a/app/views/users/partials/ip.blade.php b/app/views/users/partials/ip.blade.php new file mode 100644 index 000000000..8e6591d35 --- /dev/null +++ b/app/views/users/partials/ip.blade.php @@ -0,0 +1,3 @@ +@if(Auth::user()->isAdmin()) + IP: {{{ $user->ip }}} +@endif \ No newline at end of file diff --git a/app/views/users/show.blade.php b/app/views/users/show.blade.php index ba521976e..f8e836a4a 100644 --- a/app/views/users/show.blade.php +++ b/app/views/users/show.blade.php @@ -11,6 +11,7 @@ {{{ $user->username }}} @include('roles.partials.badges', ['roles' => $user->roles]) + @include('users.partials.ip', ['user' => $user] )
@include('users.partials.actions', ['user' => $user] ) diff --git a/public/css/lanager.css b/public/css/lanager.css index b88ade864..f9de3ea4b 100644 --- a/public/css/lanager.css +++ b/public/css/lanager.css @@ -147,19 +147,25 @@ div.profile-header div.profile-avatar { div.profile-header h1 { margin: 0px; - line-height: 190px; + padding-top: 60px; +} + +div.profile-actions { + text-align: center; + width: 190px; + margin-top: 75px; } @media (max-width: 1200px) { /* move profile name under avatar for small screens*/ div.profile-header h1 { line-height: inherit; clear:both; + padding-top: 0px; } -} -div.profile-actions { - text-align: center; - width: 190px; + div.profile-actions { + margin-top:5px; + } } div.profile-nav { From 1ce360e9f6f34be519dfb3e1ce2e771dda28c313 Mon Sep 17 00:00:00 2001 From: Jacob Murphy Date: Mon, 11 Jan 2016 04:12:11 +0800 Subject: [PATCH 02/13] Allow Normal Users (NonAdmins) to Signup to Events Allows Normal Users to Sign up to Events (Admins have permission, while normal users do not). Addition to #93 The real issue is currently $this->input['user_id'], however using $input['user_id'] does the job just fine. --- app/Domain/EventSignups/EventSignupService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Domain/EventSignups/EventSignupService.php b/app/Domain/EventSignups/EventSignupService.php index c93f8b0b6..5e06da90e 100644 --- a/app/Domain/EventSignups/EventSignupService.php +++ b/app/Domain/EventSignups/EventSignupService.php @@ -72,7 +72,7 @@ protected function domainRulesOnStore( $input ) if ( ! $this->user->hasRole('Events Admin') ) { - if ( $this->input['user_id'] != $this->user->id() ) + if ( $input['user_id'] != $this->user->id() ) throw new AuthorisationException( 'You may only sign yourself up to events' ); if ( ! $event->isOpenForSignups() ) From 06f549e5892ae942f33759215c931ed0136c9dd0 Mon Sep 17 00:00:00 2001 From: ilumos Date: Mon, 9 Apr 2018 12:42:10 +0100 Subject: [PATCH 03/13] Normalise line endings --- docs/screenshots/event-edit.png | Bin 465409 -> 465403 bytes docs/screenshots/event-signups.png | Bin 682632 -> 682622 bytes docs/screenshots/games.png | Bin 909725 -> 909710 bytes docs/screenshots/info-admin-2.png | Bin 785184 -> 785174 bytes docs/screenshots/info-admin.png | Bin 573100 -> 573087 bytes docs/screenshots/info_0.png | Bin 810223 -> 810210 bytes docs/screenshots/lanager-timetable-2.png | Bin 1077736 -> 1077718 bytes docs/screenshots/lanager-timetable.png | Bin 862806 -> 862791 bytes docs/screenshots/links.png | Bin 644308 -> 644299 bytes docs/screenshots/people.png | Bin 789861 -> 789851 bytes docs/screenshots/profile-admin.png | Bin 814118 -> 814106 bytes docs/screenshots/profile.png | Bin 853591 -> 853578 bytes docs/screenshots/servers.png | Bin 839502 -> 839491 bytes docs/screenshots/shouts-admin.png | Bin 811389 -> 811377 bytes docs/screenshots/shouts.png | Bin 833166 -> 833152 bytes .../apple-touch-icon-152x152-precomposed.png | Bin 7427 -> 7426 bytes .../fonts/glyphicons-halflings-regular.ttf | Bin 45404 -> 45386 bytes public/img/bg-html.jpg | Bin 254745 -> 254740 bytes public/img/logo.png | Bin 5329 -> 5328 bytes public/img/sits_large_noborder.png | Bin 5861 -> 5859 bytes public/img/sits_small.png | Bin 4847 -> 4845 bytes 21 files changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/screenshots/event-edit.png b/docs/screenshots/event-edit.png index 2323a6dcbff107759d9cd8b0f08eafb1afd9c0d7..ab8426910f51df5cb919e8aab31cc5602e7f923d 100644 GIT binary patch delta 55 zcmV-70LcG=v>f}h90Z9_PDgz!_bn>^bpakl$ NhnrCax0_K0X2^)Y7@q(D delta 66 zcmeypS*CG|3~OhApF3|OODhZGRu-o7N{qbQFDo&XOajvGTbVxm0Mh2`m`gqZ>D3EZ TUTt9HZJ!#*x_xROTiOW#9AVCQE04pL-+gR#wKxf!kjOGB&T@p3BJ8+Q0qt1g6}X+Y_~zZ4Ygq|Ax7u sc)LUb%hKZZeV19b@4L)edaT`K78?+=12M;TlUbZ+b+i_@% diff --git a/docs/screenshots/games.png b/docs/screenshots/games.png index 5032947dff3d5c1a53b9afbeba6fb822ad4b8d9b..93d765000265bb7ea53d51260e08395de6476574 100644 GIT binary patch delta 126 zcmbPx*u3wsIZJ1NpZiAELytC}c%;{~{d)?dlJ$0}1&rGJw!6hKJ&xF}wVkO&w0->< zrtRy`Fl#Ed-+apq#4JF}y8Y%`Hl~%^?@VJ?7j0)*!w$q8+ga9dTCLu0AI{Y!z5P@X e*Qaakdp)_g@Ac$KoxffAB@gG^?YeEe1Y(Dp}IcsNtpF8hHmP3yic{d+>q}RmAyZuWFqmng{7F)omy$?t`#xXsP0MaVk znOZ~{dD~ZvDhi$C|w{5Kk{*Je7JO>F9w{}hk0YHa%jt94RjtJ@!w_~9Q LXb!i`uL$4{<0dX1 delta 128 zcmbRLS82^(CDzUWKX=}ZECS_>yqiVJH}f*`HXm=qtz`)?tpzrBpS?LQVU zZU3==xg{9LuKB{ez2*x`KhJh9M%L&xK#|n7tlLx9vi$?;NVZ|;6avyYe(a16K)KvL Y_U*ZS9IrrP;R`u3_<;2O^&AiQ04?e+N&o-= diff --git a/docs/screenshots/info_0.png b/docs/screenshots/info_0.png index 211ce238f11f7d2d4e21a6642866683371c5c90c..c0f65147a91e5d93cb5aef5fd7991a5e41d3f034 100644 GIT binary patch delta 114 zcmV-&0FD3exiR9oF$9TFPDil?qJD#@ez&N80fZyBEusNlBe#sj0kxaALSX_ozqfiI z1JV=M4`43T`v6 diff --git a/docs/screenshots/lanager-timetable-2.png b/docs/screenshots/lanager-timetable-2.png index 9fd57e06f59d2505802f38920341ed395dc654a5..ade26e5356227f3e67dbe5b918d4597e637e67ef 100644 GIT binary patch delta 143 zcmV;A0C4~4<3ZNrK?I3VPDil?GT);(-*$&NRROm-RRVMBx2-<|o-T(>ZUeVWZUh%c zw`8>hzWTQ#umz?gx60E6Vzh@Xhz7SUhzB_Dw`O+;z*&bU(FnIE(Fy3aw-AR4#6h>! x$O?&IhhHfRw_hm?-=DWX$qbCvhs>W1hs>W2x6Gdp&N8=~(htHHw_fTGiii4rL4p7P delta 178 zcmcci*zv_*gD~IrJ@fg`83Dz+ PF7Y1{2hu*T_`BKxb*e#$ diff --git a/docs/screenshots/lanager-timetable.png b/docs/screenshots/lanager-timetable.png index b710d0c3d8b7167df3fca7209b76c639b8530a7f..7c9f3da9efb9d23ad9596486440e2e15d7c512b1 100644 GIT binary patch delta 130 zcmV-|0Db?~)HKJ`Gz5uIPDg(S^DqHY55sE8j}E|8#Ffn diff --git a/docs/screenshots/links.png b/docs/screenshots/links.png index 668d22f95e7743569228240e97f440862f39d781..a8f50743621b6132f633fbd78778b88c94ae6553 100644 GIT binary patch delta 85 zcmV-b0IL7gsVB>+Cj^O5PDg0w+m|n9I}Tf9R#;19R)*Nw`_R@ rmNSO~tp&FOtp){Gw+RFXHJi6Tp9hC{x5pOh E00vDmEdT%j delta 123 zcmcaT%i!rO1J=#}KX=}ZEN?{^d7D3qZ2u_2csz%Zw|z$=l$_hvN!oFy_k diff --git a/docs/screenshots/profile-admin.png b/docs/screenshots/profile-admin.png index beaf0aa5e92e66fd260123aaf08f81c46663f576..b9cf44d4fa794ecbf57980f56fb213cec51079ea 100644 GIT binary patch delta 111 zcmZ2>!*JFOLzd0}KlhES0kxaMY7d7tOI>c4y3Dv;>N3-#`P=^%F}K)kZ(7fMgJ*m6 z9%eb`?N$GoH#lwAc4CqJ+3so0y4};7t;lTqoR(4{M{mIDN?qJQj-NBlz$P6g9sgO-32Pk&#F5C8V bciH{Lfo$2Y>_E%`#GF9PwO#fr_un!A&EhcN diff --git a/docs/screenshots/profile.png b/docs/screenshots/profile.png index 1eeb87a88272f546d9dc5e374da49e85d2a2ecd8..7074e48a85fe7c5aa2a9e3e17c6a3d04b1665ef9 100644 GIT binary patch delta 114 zcmccKV{)p;grzgU&wV4Sis)u7QO%FrL)aLPZQL%sgYks-_9x6tMw#v6xlBOJyj?t( zg{Nq{%6*pditTg4S!eHQw-8|iVs;?r0Afxc=Gtx{!rh*~{XjGKb+PR;W^o(XZ9jQ~ Ndy(Px94?;MzX4%;DsTV* delta 139 zcmX@rV{*O6gtark&z*N8i;5^C?`92A&5w+{+XLAck8K3f;yV~mcmwJC%uGg^jJ)lF zxlBOJyj?Jtg{KH8E_%&-m~>W0uYUKlet~t*nf)-R;WVjN6sFnHog4FPYEOw|l#BG_y$fc8^WWPiD01 zdb4cT^=6%!)_!~=D-g47KfaOO!C*VbBX%3-?XIdEes9{R2yy~37Z7uApCZV!L4Lcd IArI#~0GH$_5C8xG delta 124 zcmX>+&-mOtW7f_9KX=|nmaQy|vfYfl?TX!u+ZDT+8bla*w=bN})VCW*>qj$-gac{k zP0UYb0M)2_vus!QW}TS^WFOeb3dC&N4{T(2Fks}}_K4la8K~4omBa5%d#4~L5OV=B S_x4Ufo{jQA87o5`&Upa$p(r5$ diff --git a/docs/screenshots/shouts-admin.png b/docs/screenshots/shouts-admin.png index e6bd8a4a8697a42575f1f9f591a3850a7e36df75..6552a3d957cc92157c09bf53822d8dd2ec70b201 100644 GIT binary patch delta 115 zcmex+$nfJKLzd0}Klet~R#wKXtW3U)?ZJ#p+k+XI?JV0TSut;)WW}=HaJy3u%L~@+ z+C?m-X6*}Cuxwwrf;C8E`>lL;y`N%ry?soI@Y^SemXI{d-oo)N>RqXkb+qLaD SfS41Axqz5^yS5!qkTL-23oC2@ delta 138 zcmex($nftWL)Oj!KX=|nmR1(Vtt?EwjEubPfs9Ps0~wj^EP?EPE9UL}RxIlc8F{zc z<*>Y91=4CoETv{Zx!EgNw$EO{8l(XfdwYR(y#kP)^O1GZT_CM@p6&D%ApLVO`*t=U dygu<^*CcAm-jKZ^sj)3;-B!EQkOA diff --git a/docs/screenshots/shouts.png b/docs/screenshots/shouts.png index 7d2460d7f5755ae62b3ceb0185190d981cce6e48..7368548ff3a5504a22f33b1c8b91d016fedcf0ae 100644 GIT binary patch delta 120 zcmV-;0EhpM?J|JvG6acGPDgW5E31-DN@2D(qT3Xuk+6t}OX2I~d4o2v#NcDK7B2LW!ky^jZHHisp~2Ztrb2)8B1 a38!6$%_9o8%_9r?EQiQY3%AHn48~>7wlZu0 delta 147 zcmZp8Yt;AFh_y4o&z-lCWh)D#<7`IWcGuaA+g)cfiCZx8ZjZUlRMrKgFU2yi{Q;!w z!&pwe0;=(JWZmxR$hONLD8@XIZHWkwUcQv=H7k&ww3A1jzsZ diff --git a/public/css/fonts/glyphicons-halflings-regular.ttf b/public/css/fonts/glyphicons-halflings-regular.ttf index 1413fc609ab6f21774de0cb7e01360095584f65b..1f853124540d93345e0db30b84b2713fb7a04b6b 100644 GIT binary patch delta 87 zcmV-d0I2`m;sVOz0XDHqZz5=t5MrRR| t_*Z(9b68fB%2Q3VA5jOCu#LQ`1mpE_{01AmJBLDyZ diff --git a/public/img/bg-html.jpg b/public/img/bg-html.jpg index bbbdcd636e1eef0e92fdc47f01bd1e5b953b9238..368f3c8c7bc54598fe05d7a2c82e0f54e9043ebf 100644 GIT binary patch delta 46 zcmV+}0MY-M#t)Rn53p!#vuSMc&WBq&0k>N_0{<7cTT=pw9=GLj0@g~0yu1Rpyu1Tl ECjL+r82|tP delta 56 zcmbPojDO}a{tX#9jJ%sOaz378tGr-S%BkLLd&6oIPnE^=M2HpSw delta 21 ccmaE>`d*c_Gr-TCcO%Ogen#HS7x-nF0avyL_W%F@ From cffcde6d199f489fcd6b20d07c8b1ddfe2dede22 Mon Sep 17 00:00:00 2001 From: ilumos Date: Wed, 30 May 2018 20:03:05 +0100 Subject: [PATCH 04/13] Fixed installation error --- app/Console/Install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Install.php b/app/Console/Install.php index 9f9de0fef..f2b234753 100644 --- a/app/Console/Install.php +++ b/app/Console/Install.php @@ -131,7 +131,7 @@ private function runInstaller() } $this->info('Marking LANager as installed in config file...'); - $lanagerConfig = $this->editConfigFile('app/config/lanager/config.php', "'installed' => false", "'installed' => true"); + $lanagerConfig = $this->editConfigFile('app/config/lanager/config.php', "'installed' => false", "'installed' => true"); if (!$lanagerConfig) { $this->abort('Unable to mark installation as completed', $this->criticalMessage); } From 51e4c7ac3d72949f0f1929c8d84c046f575e4862 Mon Sep 17 00:00:00 2001 From: ilumos Date: Wed, 30 May 2018 20:34:20 +0100 Subject: [PATCH 05/13] Changing .gitattributes to use auto line endings --- .gitattributes | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 431841927..176a458f9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1 @@ * text=auto - -# Force the following filetypes to have unix eols, so Windows does not break them -*.* text eol=lf From df03918954f33267f10e917207c7845e5fc0d83f Mon Sep 17 00:00:00 2001 From: ilumos Date: Wed, 30 May 2018 20:40:03 +0100 Subject: [PATCH 06/13] Fixing corrupt images due to line endings --- docs/screenshots/event-edit.png | Bin 465403 -> 465409 bytes docs/screenshots/event-signups.png | Bin 682622 -> 682632 bytes docs/screenshots/games.png | Bin 909710 -> 909725 bytes docs/screenshots/info-admin-2.png | Bin 785174 -> 785184 bytes docs/screenshots/info-admin.png | Bin 573087 -> 573100 bytes docs/screenshots/info_0.png | Bin 810210 -> 810223 bytes docs/screenshots/lanager-timetable-2.png | Bin 1077718 -> 1077736 bytes docs/screenshots/lanager-timetable.png | Bin 862791 -> 862806 bytes docs/screenshots/links.png | Bin 644299 -> 644308 bytes docs/screenshots/people.png | Bin 789851 -> 789861 bytes docs/screenshots/profile-admin.png | Bin 814106 -> 814118 bytes docs/screenshots/profile.png | Bin 853578 -> 853591 bytes docs/screenshots/servers.png | Bin 839491 -> 839502 bytes docs/screenshots/shouts-admin.png | Bin 811377 -> 811389 bytes docs/screenshots/shouts.png | Bin 833152 -> 833166 bytes public/img/logo.png | Bin 5328 -> 5329 bytes public/img/sits_large_noborder.png | Bin 5859 -> 5861 bytes public/img/sits_small.png | Bin 4845 -> 4847 bytes 18 files changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/screenshots/event-edit.png b/docs/screenshots/event-edit.png index ab8426910f51df5cb919e8aab31cc5602e7f923d..2323a6dcbff107759d9cd8b0f08eafb1afd9c0d7 100644 GIT binary patch delta 66 zcmeypS*CG|3~OhApF3|OODhZGRu-o7N{qbQFDo&XOajvGTbVxm0Mh2`m`gqZ>D3EZ TUTt9HZJ!#*x_xROTiOW#9f}h90Z9_PDgz!_bn>^bpakl$ NhnrCax0_K0X2^)Y7@q(D diff --git a/docs/screenshots/event-signups.png b/docs/screenshots/event-signups.png index d836648ab094727f81160eb027b373fd559c59c2..a5241df716b525f4ee1a25840b36afa085ab3858 100644 GIT binary patch delta 107 zcmex&MYH3oCTnMapF3|O%T^Y~$AOHz+n)zAHm?WLS&U4r{XqKt1g6}XKsrW?+4c~S zp81Bkq8LaECa^38((T(WvuxjXnYHv7kgYw74T#x+m}9&4EY7pKKy^QkbG9u408pnV A>i_@% delta 88 zcmeCUs`>AVCQE04pL-+gR#wKxf!kjOGB&T@p3BJ8+Q0qt1g6}X+Y_~zZ4Ygq|Ax7u sc)LUb%hKZZeV19b@4L)edaT`K78?+=12M;TlUbZ+b+Y(Dp}IcsNtpF8hHmP3yic{d+>q}RmAyZuWFqmng{7F)omy$?t`#xXsP0MaVk znOZ~{dD~Z< zrtRy`Fl#Ed-+apq#4JF}y8Y%`Hl~%^?@VJ?7j0)*!w$q8+ga9dTCLu0AI{Y!z5P@X e*Qaakdp)_g@Ac$KoxffAB@gG^?YeEe1yqiVJH}f*`HXm=qtz`)?tpzrBpS?LQVU zZU3==xg{9LuKB{ez2*x`KhJh9M%L&xK#|n7tlLx9vi$?;NVZ|;6avyYe(a16K)KvL Y_U*ZS9IrrP;R`u3_<;2O^&AiQ04?e+N&o-= delta 105 zcmV-v0G9u({UV?JA_R$0PDil?5O=c{ce4$H%7nMdgaI^;xBn6X{f&qHpaQr3paXvDhi$C|w{5Kk{*Je7JO>F9w{}hk0YHa%jt94RjtJ@!w_~9Q LXb!i`uL$4{<0dX1 diff --git a/docs/screenshots/info_0.png b/docs/screenshots/info_0.png index c0f65147a91e5d93cb5aef5fd7991a5e41d3f034..211ce238f11f7d2d4e21a6642866683371c5c90c 100644 GIT binary patch delta 139 zcmaE~)A0RHL)Oj!KX=}ZEQ{(Gd7GEjZC_T$*rLqHyIpG$V;qR?ILf$nHjuVWWHR3m zq)QZ-F9|d9w!4`yZ+A0c30?=M4`43T`v6 delta 114 zcmV-&0FD3exiR9oF$9TFPDil?qJD#@ez&N80fZyBEusNlBe#sj0kxaALSX_ozqfiI z1JV*gD~IrJ@fg`83Dz+ PF7Y1{2hu*T_`BKxb*e#$ delta 143 zcmV;A0C4~4<3ZNrK?I3VPDil?GT);(-*$&NRROm-RRVMBx2-<|o-T(>ZUeVWZUh%c zw`8>hzWTQ#umz?gx60E6Vzh@Xhz7SUhzB_Dw`O+;z*&bU(FnIE(Fy3aw-AR4#6h>! x$O?&IhhHfRw_hm?-=DWX$qbCvhs>W1hs>W2x6Gdp&N8=~(htHHw_fTGiii4rL4p7P diff --git a/docs/screenshots/lanager-timetable.png b/docs/screenshots/lanager-timetable.png index 7c9f3da9efb9d23ad9596486440e2e15d7c512b1..b710d0c3d8b7167df3fca7209b76c639b8530a7f 100644 GIT binary patch delta 159 zcmX?p#pK!*6V}cEKX=|nmaQy|c4~~g+nv-H*Kq;q4+e~tDnL3jl<_b(kk(0L{A16^ z+pe*Yal6JsrmLJlvA?UBR;&ezEsbE_zBGcx`7KcFg)8gDB|x#AuUNP5e8mY55sE8j}E|8#Ffn delta 130 zcmV-|0Db?~)HKJ`Gz5uIPDg(S^DqH+Cj^O5PDg0w+m|n9I}Tf9R#;19R)*Nw`_R@ rmNSO~tp&FOtp){Gw+RFXHJi6Tp9hC{x5pOl$_hvN!oFy_k delta 104 zcmaDl%i#7b1D4JJKlhESZ$+9vi){Za!gxHVeRm_{_T7z4%vsy_zh;_0e|vm4vuEM< zm4BGu%eK#yV%a`ZiuFwA_OvCe@dDeAZDDh E00vDmEdT%j diff --git a/docs/screenshots/profile-admin.png b/docs/screenshots/profile-admin.png index b9cf44d4fa794ecbf57980f56fb213cec51079ea..beaf0aa5e92e66fd260123aaf08f81c46663f576 100644 GIT binary patch delta 134 zcmbPr!*JORL)Oj!KX=}ZECIEQyqiO64~H`HHj7_w7r)H7UHmfBqxp=y+kX}@x7Yyb z+V#vgcz|^19%eabAYJ^Qd4m&>R(4{M{mIDN?qJQj-NBlz$P6g9sgO-32Pk&#F5C8V bciH{Lfo$2Y>_E%`#GF9PwO#fr_un!A&EhcN delta 111 zcmZ2>!*JFOLzd0}KlhES0kxaMY7d7tOI>c4y3Dv;>N3-#`P=^%F}K)kZ(7fMgJ*m6 z9%eb`?N$GoH#lwAc4CqJ+3so0y4};7t;lTqo+&-mOtW7f_9KX=|nmaQy|vfYfl?TX!u+ZDT+8bla*w=bN})VCW*>qj$-gac{k zP0UYb0M)2_vus!QW}TS^WFOeb3dC&N4{T(2Fks}}_K4la8K~4omBa5%d#4~L5OV=B S_x4Ufo{jQA87o5`&Upa$p(r5$ delta 106 zcmX>%&-m~>W0uYUKlet~t*nf)-R;WVjN6sFnHog4FPYEOw|l#BG_y$fc8^WWPiD01 zdb4cT^=6%!)_!~=D-g47KfaOO!C*VbBX%3-?XIdEes9{R2yy~37Z7uApCZV!L4Lcd IArI#~0GH$_5C8xG diff --git a/docs/screenshots/shouts-admin.png b/docs/screenshots/shouts-admin.png index 6552a3d957cc92157c09bf53822d8dd2ec70b201..e6bd8a4a8697a42575f1f9f591a3850a7e36df75 100644 GIT binary patch delta 138 zcmex($nftWL)Oj!KX=|nmR1(Vtt?EwjEubPfs9Ps0~wj^EP?EPE9UL}RxIlc8F{zc z<*>Y91=4CoETv{Zx!EgNw$EO{8l(XfdwYR(y#kP)^O1GZT_CM@p6&D%ApLVO`*t=U dygu<^*CcAm-jKZ^sj)3;-B!EQkOA delta 115 zcmex+$nfJKLzd0}Klet~R#wKXtW3U)?ZJ#p+k+XI?JV0TSut;)WW}=HaJy3u%L~@+ z+C?m-X6*}Cuxwwrf;C8E`>lL;y`N%ry?soI@Y^SemXI{d-oo)N>RqXkb+qLaD SfS41Axqz5^yS5!qkTL-23oC2@ diff --git a/docs/screenshots/shouts.png b/docs/screenshots/shouts.png index 7368548ff3a5504a22f33b1c8b91d016fedcf0ae..7d2460d7f5755ae62b3ceb0185190d981cce6e48 100644 GIT binary patch delta 147 zcmZp8Yt;AFh_y4o&z-lCWh)D#<7`IWcGuaA+g)cfiCZx8ZjZUlRMrKgFU2yi{Q;!w z!&pwe0;=(JWZmxR$hONLD8@XIZHWkwUcQv=H7k&ww3W5E31-DN@2D(qT3Xuk+6t}OX2I~d4o2v#NcDK7B2LW!ky^jZHHisp~2Ztrb2)8B1 a38!6$%_9o8%_9r?EQiQY3%AHn48~>7wlZu0 diff --git a/public/img/logo.png b/public/img/logo.png index ccfa35a8ff71a571e3fde21268f88a9b1facb59a..6913d3020a2f13a58086aabd349b9f5d5baf550a 100644 GIT binary patch delta 14 Vcmcbhc~O(KGr-TCcO%Og5dbM31qlEE delta 13 Ucmcbpc|nt`d*c_Gr-TCcO%Ogen#HS7x-nF0avyL_W%F@ delta 18 ZcmaE_`c{>tGr-S%BkLLd&6oIPnE^=M2HpSw From 7dd6fbcfd8c7b5c6fb7272d1477e29aab08632b5 Mon Sep 17 00:00:00 2001 From: ilumos Date: Sat, 3 Nov 2018 16:25:55 +0000 Subject: [PATCH 07/13] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..e97228574 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +# Describe the bug +A clear and concise description of what the bug is + +# Expected behaviour +What you thought would happen + +# How to reproduce the bug +1. Go to '...' +2. Click on '...' +3. Scroll down to '...' +4. See error + +# Environment + - **Server OS**: + - **Browser**: + - **Output of `git log --pretty="%h" -n1 HEAD`**: + +# Screenshots +If applicable, add screenshots to help explain your problem + +# Log entry +Copy and paste from ⚙> Logs > (relevant log entry) > Markdown + +# Additional context +Any extra detail about the problem From 7ee3a18beaa905b890adb0465b28c73d688445e4 Mon Sep 17 00:00:00 2001 From: ilumos Date: Sat, 17 Nov 2018 15:04:46 +0000 Subject: [PATCH 08/13] Improving readme --- README.md | 195 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 109 insertions(+), 86 deletions(-) diff --git a/README.md b/README.md index 5897b7f86..bd8eb835e 100644 --- a/README.md +++ b/README.md @@ -48,105 +48,128 @@ And much more planned - check the [issue tracker](https://github.com/zeropingher ![Custom Links](docs/screenshots/links.png) ## Requirements -* Web server - *Apache 2.4.x recommended* -* Database server - *MySQL 5.5.x recommended* -* Git 1.9.x -* PHP 5.6.x -* Composer 1.x -* A [Steam Account](https://store.steampowered.com/join/) -* An Internet connection -* Shell access to the server - **basic web hosting alone will not work!** -## Installation on Ubuntu Server 14.04 +* Server running Ubuntu Server 14.04 (_with shell access - basic web hosting is not supported_) +* [Steam API Key](http://steamcommunity.com/dev/apikey) +* Internet access -*Advanced users will be able to deploy LANager to Windows and OS X, though LANager has not been fully tested on these OSes.* +## Installation 1. Install the project's packaged dependencies: - `sudo apt install git composer php5-common php5-cli php5-mcrypt php5-curl php5-mysql libapache2-mod-php5 mysql-server apache2` + ```bash + sudo apt install git php5-common php5-cli php5-mcrypt php5-curl php5-mysql libapache2-mod-php5 mysql-server apache2 zip + php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + php -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" + php composer-setup.php + php -r "unlink('composer-setup.php');" + mv composer.phar /usr/local/bin/composer + ``` 2. Enable Apache and PHP modules: - `sudo a2enmod rewrite` - - `sudo php5enmod mcrypt curl` + ```bash + sudo a2enmod rewrite + sudo php5enmod mcrypt curl + ``` 3. Configure Apache to use the project's public directory as the web root: - 1. Edit the default site configuration: + 1. Edit the default site configuration: + + ```bash + sudo nano /etc/apache2/sites-enabled/000-default.conf + ``` - `sudo nano /etc/apache2/sites-enabled/000-default.conf` + 2. Change the `DocumentRoot` line to: + + ```apacheconfig + DocumentRoot /var/www/lanager/public + ``` - 2. Change the DocumentRoot line to: - - `DocumentRoot /var/www/lanager/public` + 3. Add the following lines inside the ` block`: + + ```apacheconfig + + AllowOverride All + + ``` - 3. Add the following lines to allow .htaccess files to set options in this directory (for [pretty URLs](http://laravel.com/docs/4.2/installation#pretty-urls)): - - ``` - - AllowOverride All - - ``` 4. Clone the project: - `git clone https://github.com/zeropingheroes/lanager.git /var/www/lanager` + ```bash + git clone https://github.com/zeropingheroes/lanager.git /var/www/lanager + ``` 5. Install the project's dependencies: - `cd /var/www/lanager` - - `composer install` - -6. Change the owner of the project files and folders to `www-data`: - - `chown -R www-data:www-data /var/www/lanager` + ```bash + cd /var/www/lanager + composer install + ``` + +6. Set permissions: -7. Allow full read and write access on the app's storage directory: + ```bash + chown -R www-data:www-data /var/www/lanager + chmod -R 777 /var/www/lanager/app/storage + ``` - `chmod -R 777 /var/www/lanager/app/storage` - -8. Create a MySQL user and database and grant the required privileges: +7. Create a MySQL user and database and grant the required privileges: + + ```bash + mysql -u root -p + ``` - 1. Run `mysql -u root -p` - 2. Type your MySQL root user password you chose during MySQL package installation - 3. Once you are at the `mysql>` prompt, run each of the following in turn: - 1. `CREATE DATABASE lanager;` - 2. `CREATE USER 'lanager'@'localhost' IDENTIFIED BY 'type a password here';` - 3. `GRANT ALL PRIVILEGES ON lanager.* TO 'lanager'@'localhost';` - 4. `FLUSH PRIVILEGES;` - 5. `quit;` + ```mysql + CREATE DATABASE lanager; + CREATE USER 'lanager'@'localhost' IDENTIFIED BY 'type a password here'; + GRANT ALL PRIVILEGES ON lanager.* TO 'lanager'@'localhost'; + FLUSH PRIVILEGES; + quit + ``` -9. Set the database password in the database config file: +8. Set the database password in the database config file: - 1. `nano /var/www/lanager/app/config/database.php` - 2. Change the `password` line to your chosen password in the previous step + ```bash + nano /var/www/lanager/app/config/database.php + ``` -10. Set your [Steam Web API key](http://steamcommunity.com/dev/apikey) in the steam config file: +9. Set your [Steam Web API key](http://steamcommunity.com/dev/apikey) in the steam config file: - `nano /var/www/lanager/app/config/lanager/steam.php` + ```bash + nano /var/www/lanager/app/config/lanager/steam.php + ``` -11. Set the correct time zone for your location in the app config file: - 1. `nano /var/www/lanager/app/config/app.php` - 2. Change the `timezone` value to a [valid PHP timezone](http://php.net/manual/en/timezones.php) +10. Set your [timezone](http://php.net/manual/en/timezones.php): -12. Run the LANager installation command: + ```bash + nano /var/www/lanager/app/config/app.php + ``` - `cd /var/www/lanager` - - `php artisan lanager:install` +11. Run the LANager installation command: -13. Schedule the LANager Steam state import command to run at 1 minute intervals: + ```bash + cd /var/www/lanager + php artisan lanager:install + ``` - 1. Make the script file executable - - `chmod +x /var/www/lanager/SteamImportUserStates.sh` - - 2. Add the script as a cron job - - 1. Run `crontab -e` - 2. Add the following to the end of the file: - `*/1 * * * * /var/www/lanager/SteamImportUserStates.sh 2>&1 | /usr/bin/logger -t lanager-steam-import-user-states` +12. Schedule the LANager Steam state import command to run at 1 minute intervals: + + ```bash + chmod +x /var/www/lanager/SteamImportUserStates.sh + crontab -e + ``` + + ```cron + */1 * * * * /var/www/lanager/SteamImportUserStates.sh 2>&1 | /usr/bin/logger -t lanager-steam-import-user-states + ``` + +13. Restart Apache + + ```bash + /etc/init.d/apache2 restart + ``` ## Usage @@ -162,48 +185,48 @@ To update to the latest version, directory simply run the following commands: 1. Back up your config files: - `cp -R /var/www/lanager/app/config ~/lanager-config-backup` + `cp -R /var/www/lanager/app/config ~/lanager-config-backup` 2. Back up your database data: - `mysqldump lanager -u lanager -p --result-file=lanager.sql` + `mysqldump lanager -u lanager -p --result-file=lanager.sql` 3. Move to the root of the project directory: - `cd /var/www/lanager` + `cd /var/www/lanager` 4. Reset all project files to their defaults: - `git reset --hard` + `git reset --hard` 5. Empty the database data and structure: - 1. `mysql -u root -p` - 2. `DROP DATABASE lanager;` - 3. `CREATE DATABASE lanager;` - 4. `quit;` + 1. `mysql -u root -p` + 2. `DROP DATABASE lanager;` + 3. `CREATE DATABASE lanager;` + 4. `quit;` 6. Get the latest version from the project repository: - - `git pull origin` + + `git pull origin` 7. Install / update dependencies: - `composer install` + `composer install` 8. Manually set your config options from the backed up files 9. Re-allow full read and write access on the app's storage directory: - `chmod -R 777 /var/www/lanager/app/storage` - + `chmod -R 777 /var/www/lanager/app/storage` + 10. Change the owner of the project files and folders to `www-data`: `chown -R www-data:www-data /var/www/lanager` 11. Re-run the installation command: - - `php artisan lanager:install` + + `php artisan lanager:install` Be warned that config file and database structure may have changed between versions so pay attention when copying data from backups from old versions. @@ -212,9 +235,9 @@ Be warned that config file and database structure may have changed between versi * Found a bug? Got a great feature idea? Post it to the [issue tracker](https://github.com/zeropingheroes/lanager/issues)! * Want to contribute? - * [Fork the project](https://github.com/zeropingheroes/lanager/fork) and add the features you want to see - * Work on new features / bug fixes in the [issue tracker](https://github.com/zeropingheroes/lanager/issues) - * Or if you're really hardcore, request commit access + * [Fork the project](https://github.com/zeropingheroes/lanager/fork) and add the features you want to see + * Work on new features / bug fixes in the [issue tracker](https://github.com/zeropingheroes/lanager/issues) + * Or if you're really hardcore, request commit access If you want to support the project in a non-technical way, we'd love it if you donated to us: From c7fcc2b40c8b9ad71f69ee3e4b7fcfa65b02629a Mon Sep 17 00:00:00 2001 From: ilumos Date: Sat, 17 Nov 2018 17:22:28 +0000 Subject: [PATCH 09/13] Changing default hostname to lanager.localhost --- Vagrantfile | 2 +- app/config/app.php | 4 ++-- bootstrap/start.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index ef5d797ac..e8dbeb007 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,7 +7,7 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "ubuntu/trusty64" - config.vm.hostname = "lanager" + config.vm.hostname = "lanager.localhost" config.vm.network "forwarded_port", guest: 80, host: 8080 config.vm.network "forwarded_port", guest: 3306, host: 3306 config.vm.network "private_network", type: "dhcp" diff --git a/app/config/app.php b/app/config/app.php index 3e1a8639c..6259d71d7 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -13,7 +13,7 @@ | */ - 'debug' => false, + 'debug' => true, /* |-------------------------------------------------------------------------- @@ -26,7 +26,7 @@ | */ - 'url' => 'http://localhost', + 'url' => 'http://lanager.localhost', /* |-------------------------------------------------------------------------- diff --git a/bootstrap/start.php b/bootstrap/start.php index a2f72e4e8..3bfb78962 100644 --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -26,7 +26,7 @@ $env = $app->detectEnvironment(array( - 'local' => array('your-machine-name'), + 'local' => array('lanager.localhost'), )); From 59a8efebc1cf18900454fe71d380bdb587422c1f Mon Sep 17 00:00:00 2001 From: ilumos Date: Sat, 17 Nov 2018 17:43:27 +0000 Subject: [PATCH 10/13] Line endings fix --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 176a458f9..6313b56c5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -* text=auto +* text=auto eol=lf From f36d2c10844d1165616edef7e14e96037fa6fa4a Mon Sep 17 00:00:00 2001 From: ilumos Date: Sat, 17 Nov 2018 18:06:33 +0000 Subject: [PATCH 11/13] Adding zip package for composer --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 5f8f7046d..7faa6bfea 100644 --- a/install.sh +++ b/install.sh @@ -10,7 +10,7 @@ printf "${GREEN}Installing dependencies with apt${BLACK}\n" debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' apt update -y && apt upgrade -y -apt install -y git php5-cli php5-common php5-mcrypt php5-curl php5-mysql libapache2-mod-php5 apache2 mysql-client-5.6 mysql-server-5.6 +apt install -y git php5-cli php5-common php5-mcrypt php5-curl php5-mysql libapache2-mod-php5 apache2 mysql-client-5.6 mysql-server-5.6 zip printf "${GREEN}Enabling PHP extensions${BLACK}\n" php5enmod mcrypt curl mysql From c24d4061891b72675638aecc0c0d88a26cb74ab2 Mon Sep 17 00:00:00 2001 From: ilumos Date: Sat, 17 Nov 2018 19:42:00 +0000 Subject: [PATCH 12/13] Fixing environment detection --- bootstrap/start.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bootstrap/start.php b/bootstrap/start.php index 3bfb78962..9d8d3eea4 100644 --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -24,11 +24,13 @@ | */ -$env = $app->detectEnvironment(array( - - 'local' => array('lanager.localhost'), - -)); +$env = $app->detectEnvironment(function () { + $fqdn = gethostbyaddr(gethostbyname(gethostname())); + if ($fqdn == 'lanager.localhost') { + return 'local'; + } + return 'production'; +}); /* |-------------------------------------------------------------------------- From 0c7cc2e7d32da338a2b6db718f5dfe6b850ef54b Mon Sep 17 00:00:00 2001 From: ilumos Date: Sat, 17 Nov 2018 20:16:59 +0000 Subject: [PATCH 13/13] Consolidating migrations --- ...2013_12_21_132103_create_session_table.php | 36 --- .../2013_12_21_132200_create_users_table.php | 42 --- .../2013_12_21_132423_create_roles_table.php | 35 -- ...13_12_21_132608_create_role_user_table.php | 50 --- ..._12_21_133017_create_permissions_table.php | 50 --- ...13_12_21_133408_create_infopages_table.php | 49 --- .../2013_12_21_133500_create_shouts_table.php | 47 --- ...12_21_134103_create_applications_table.php | 38 --- ...2013_12_21_134153_create_servers_table.php | 52 --- .../2013_12_21_134203_create_states_table.php | 69 ---- ..._02_09_144436_create_event_types_table.php | 39 --- .../2014_02_09_144536_create_events_table.php | 53 --- ...14_02_15_153129_add_event_signup_times.php | 38 --- ...2_15_175719_create_event_signups_table.php | 52 --- ...14_03_12_174145_create_playlists_table.php | 36 --- ..._12_174313_create_playlist_items_table.php | 63 ---- ..._25_183319_add_playlist_playback_state.php | 35 -- ...212719_add_steam_user_visibility_field.php | 35 -- ...26_add_playlist_item_skip_reason_field.php | 34 -- ...53542_create_playlist_item_votes_table.php | 54 ---- ...5_12_204815_create_achievements_tables.php | 102 ------ ...14_05_18_110935_add_user_visible_field.php | 35 -- ...4_05_18_123108_add_user_remember_token.php | 33 -- ...10_194607_add_playlist_settings_fields.php | 40 --- ...220201_add_playlist_skip_percent_field.php | 34 -- ..._add_playlist_item_played_at_timestamp.php | 34 -- ..._06_22_203017_add_role_user_timestamps.php | 33 -- ..._140409_add_playlist_description_field.php | 33 -- ..._224418_change_playlist_max_duplicates.php | 42 --- ...1_16_230112_change_user_skip_threshold.php | 34 -- ..._230122_change_user_skip_threshold_pt2.php | 35 -- ...11_16_230214_move_playlist_description.php | 28 -- ...33_remove_playlist_max_item_duplicates.php | 35 -- ...33228_remove_achievement_visible_field.php | 34 -- ..._035228_remove_achievement_image_field.php | 33 -- ..._disallow_null_achievement_description.php | 28 -- ..._remove_playlist_item_vote_value_field.php | 32 -- ...change_playlist_playback_state_default.php | 28 -- .../2014_12_06_210934_rename_awards_table.php | 103 ------ ...14_12_06_215115_rename_role_user_table.php | 79 ----- ...4_12_08_223752_rename_info_pages_table.php | 72 ----- ...14_12_19_234213_add_user_api_key_field.php | 33 -- ..._playlist_items_remove_played_at_field.php | 34 -- ..._175539_change_events_table_event_type.php | 32 -- ...4_12_005048_add_role_assigned_by_field.php | 42 --- ...5_04_12_011503_add_page_position_field.php | 35 -- .../2015_04_12_195732_create_logs_table.php | 35 -- ..._04_19_123122_add_page_published_field.php | 35 -- ...04_19_151602_add_event_published_field.php | 35 -- ...2015_06_12_220859_drop_playlist_tables.php | 120 ------- .../2018_11_17_180942_release_v0_5_3.php | 306 ++++++++++++++++++ 51 files changed, 306 insertions(+), 2235 deletions(-) delete mode 100644 database/migrations/2013_12_21_132103_create_session_table.php delete mode 100644 database/migrations/2013_12_21_132200_create_users_table.php delete mode 100644 database/migrations/2013_12_21_132423_create_roles_table.php delete mode 100644 database/migrations/2013_12_21_132608_create_role_user_table.php delete mode 100644 database/migrations/2013_12_21_133017_create_permissions_table.php delete mode 100644 database/migrations/2013_12_21_133408_create_infopages_table.php delete mode 100644 database/migrations/2013_12_21_133500_create_shouts_table.php delete mode 100644 database/migrations/2013_12_21_134103_create_applications_table.php delete mode 100644 database/migrations/2013_12_21_134153_create_servers_table.php delete mode 100644 database/migrations/2013_12_21_134203_create_states_table.php delete mode 100644 database/migrations/2014_02_09_144436_create_event_types_table.php delete mode 100644 database/migrations/2014_02_09_144536_create_events_table.php delete mode 100644 database/migrations/2014_02_15_153129_add_event_signup_times.php delete mode 100644 database/migrations/2014_02_15_175719_create_event_signups_table.php delete mode 100644 database/migrations/2014_03_12_174145_create_playlists_table.php delete mode 100644 database/migrations/2014_03_12_174313_create_playlist_items_table.php delete mode 100644 database/migrations/2014_03_25_183319_add_playlist_playback_state.php delete mode 100644 database/migrations/2014_04_14_212719_add_steam_user_visibility_field.php delete mode 100644 database/migrations/2014_04_27_161926_add_playlist_item_skip_reason_field.php delete mode 100644 database/migrations/2014_05_03_153542_create_playlist_item_votes_table.php delete mode 100644 database/migrations/2014_05_12_204815_create_achievements_tables.php delete mode 100644 database/migrations/2014_05_18_110935_add_user_visible_field.php delete mode 100644 database/migrations/2014_05_18_123108_add_user_remember_token.php delete mode 100644 database/migrations/2014_06_10_194607_add_playlist_settings_fields.php delete mode 100644 database/migrations/2014_06_10_220201_add_playlist_skip_percent_field.php delete mode 100644 database/migrations/2014_06_12_194550_add_playlist_item_played_at_timestamp.php delete mode 100644 database/migrations/2014_06_22_203017_add_role_user_timestamps.php delete mode 100644 database/migrations/2014_09_28_140409_add_playlist_description_field.php delete mode 100644 database/migrations/2014_11_16_224418_change_playlist_max_duplicates.php delete mode 100644 database/migrations/2014_11_16_230112_change_user_skip_threshold.php delete mode 100644 database/migrations/2014_11_16_230122_change_user_skip_threshold_pt2.php delete mode 100644 database/migrations/2014_11_16_230214_move_playlist_description.php delete mode 100644 database/migrations/2014_11_29_230933_remove_playlist_max_item_duplicates.php delete mode 100644 database/migrations/2014_11_30_033228_remove_achievement_visible_field.php delete mode 100644 database/migrations/2014_11_30_035228_remove_achievement_image_field.php delete mode 100644 database/migrations/2014_11_30_043232_disallow_null_achievement_description.php delete mode 100644 database/migrations/2014_11_30_134250_remove_playlist_item_vote_value_field.php delete mode 100644 database/migrations/2014_11_30_140720_change_playlist_playback_state_default.php delete mode 100644 database/migrations/2014_12_06_210934_rename_awards_table.php delete mode 100644 database/migrations/2014_12_06_215115_rename_role_user_table.php delete mode 100644 database/migrations/2014_12_08_223752_rename_info_pages_table.php delete mode 100644 database/migrations/2014_12_19_234213_add_user_api_key_field.php delete mode 100644 database/migrations/2015_03_15_160401_playlist_items_remove_played_at_field.php delete mode 100644 database/migrations/2015_04_06_175539_change_events_table_event_type.php delete mode 100644 database/migrations/2015_04_12_005048_add_role_assigned_by_field.php delete mode 100644 database/migrations/2015_04_12_011503_add_page_position_field.php delete mode 100644 database/migrations/2015_04_12_195732_create_logs_table.php delete mode 100644 database/migrations/2015_04_19_123122_add_page_published_field.php delete mode 100644 database/migrations/2015_04_19_151602_add_event_published_field.php delete mode 100644 database/migrations/2015_06_12_220859_drop_playlist_tables.php create mode 100644 database/migrations/2018_11_17_180942_release_v0_5_3.php diff --git a/database/migrations/2013_12_21_132103_create_session_table.php b/database/migrations/2013_12_21_132103_create_session_table.php deleted file mode 100644 index 55353e60c..000000000 --- a/database/migrations/2013_12_21_132103_create_session_table.php +++ /dev/null @@ -1,36 +0,0 @@ -string('id') - ->unique(); - - $table->text('payload'); - - $table->integer('last_activity'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('sessions'); - } - -} diff --git a/database/migrations/2013_12_21_132200_create_users_table.php b/database/migrations/2013_12_21_132200_create_users_table.php deleted file mode 100644 index 4524c4c39..000000000 --- a/database/migrations/2013_12_21_132200_create_users_table.php +++ /dev/null @@ -1,42 +0,0 @@ -increments('id'); - - $table->string('username', 32); - - $table->string('steam_id_64', 17) - ->unique(); - - $table->string('ip', 15); - - $table->string('avatar', 255); - - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('users'); - } - -} \ No newline at end of file diff --git a/database/migrations/2013_12_21_132423_create_roles_table.php b/database/migrations/2013_12_21_132423_create_roles_table.php deleted file mode 100644 index 9433170ed..000000000 --- a/database/migrations/2013_12_21_132423_create_roles_table.php +++ /dev/null @@ -1,35 +0,0 @@ -increments('id'); - - $table->string('name'); - - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('roles'); - } - -} \ No newline at end of file diff --git a/database/migrations/2013_12_21_132608_create_role_user_table.php b/database/migrations/2013_12_21_132608_create_role_user_table.php deleted file mode 100644 index c9174d4e4..000000000 --- a/database/migrations/2013_12_21_132608_create_role_user_table.php +++ /dev/null @@ -1,50 +0,0 @@ -increments('id'); - - $table->integer('user_id') - ->unsigned(); - - $table->integer('role_id') - ->unsigned(); - - // Relationships - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('role_id') - ->references('id') - ->on('roles') - ->onUpdate('cascade') - ->onDelete('cascade'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('role_user'); - } - -} \ No newline at end of file diff --git a/database/migrations/2013_12_21_133017_create_permissions_table.php b/database/migrations/2013_12_21_133017_create_permissions_table.php deleted file mode 100644 index caf2a0b52..000000000 --- a/database/migrations/2013_12_21_133017_create_permissions_table.php +++ /dev/null @@ -1,50 +0,0 @@ -increments('id'); - - $table->integer('user_id') - ->unsigned(); - - $table->string('type'); - - $table->string('action'); - - $table->string('resource'); - - $table->timestamps(); - - // Relationships - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('permissions'); - } - -} \ No newline at end of file diff --git a/database/migrations/2013_12_21_133408_create_infopages_table.php b/database/migrations/2013_12_21_133408_create_infopages_table.php deleted file mode 100644 index 38eaeaebb..000000000 --- a/database/migrations/2013_12_21_133408_create_infopages_table.php +++ /dev/null @@ -1,49 +0,0 @@ -increments('id'); - - $table->integer('parent_id') - ->nullable() - ->unsigned(); - - $table->string('title'); - - $table->text('content') - ->nullable(); - - $table->timestamps(); - - // Relationships - $table->foreign('parent_id') - ->references('id') - ->on('info_pages') - ->onUpdate('cascade') - ->onDelete('set null'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('info_pages'); - } - -} \ No newline at end of file diff --git a/database/migrations/2013_12_21_133500_create_shouts_table.php b/database/migrations/2013_12_21_133500_create_shouts_table.php deleted file mode 100644 index 29097f7d9..000000000 --- a/database/migrations/2013_12_21_133500_create_shouts_table.php +++ /dev/null @@ -1,47 +0,0 @@ -increments('id'); - - $table->integer('user_id') - ->unsigned(); - - $table->string('content'); - - $table->boolean('pinned'); - - $table->timestamps(); - - // Relationships - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('shouts'); - } - -} \ No newline at end of file diff --git a/database/migrations/2013_12_21_134103_create_applications_table.php b/database/migrations/2013_12_21_134103_create_applications_table.php deleted file mode 100644 index a6df0da82..000000000 --- a/database/migrations/2013_12_21_134103_create_applications_table.php +++ /dev/null @@ -1,38 +0,0 @@ -increments('id'); - - $table->string('name'); - - $table->integer('steam_app_id')->unique(); - - $table->timestamps(); - - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('applications'); - } - -} \ No newline at end of file diff --git a/database/migrations/2013_12_21_134153_create_servers_table.php b/database/migrations/2013_12_21_134153_create_servers_table.php deleted file mode 100644 index a4dc623ab..000000000 --- a/database/migrations/2013_12_21_134153_create_servers_table.php +++ /dev/null @@ -1,52 +0,0 @@ -increments('id'); - - $table->integer('application_id') - ->unsigned(); - - $table->string('name') - ->nullable(); - - $table->string('address'); // ipv4, hostname or ipv6 - - $table->string('port'); - - $table->boolean('pinned'); - - $table->timestamps(); - - // Relationships - $table->foreign('application_id') - ->references('id') - ->on('applications') - ->onUpdate('cascade') - ->onDelete('cascade'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('servers'); - } - -} \ No newline at end of file diff --git a/database/migrations/2013_12_21_134203_create_states_table.php b/database/migrations/2013_12_21_134203_create_states_table.php deleted file mode 100644 index 9bfc5eae0..000000000 --- a/database/migrations/2013_12_21_134203_create_states_table.php +++ /dev/null @@ -1,69 +0,0 @@ -increments('id'); - - $table->integer('user_id') - ->unsigned(); - - $table->integer('application_id') - ->unsigned() - ->nullable(); // nullable to prevent circular dependencies - - $table->integer('server_id') - ->unsigned() - ->nullable(); // nullable to prevent circular dependencies - - $table->smallInteger('status') - ->unsigned(); - - $table->timestamps(); - - // Relationships - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('application_id') - ->references('id') - ->on('applications') - ->onUpdate('cascade') - ->onDelete('set null'); - - $table->foreign('server_id') - ->references('id') - ->on('servers') - ->onUpdate('cascade') - ->onDelete('set null'); - - // Indexes - $table->index(['user_id', 'created_at']); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('states'); - } - -} diff --git a/database/migrations/2014_02_09_144436_create_event_types_table.php b/database/migrations/2014_02_09_144436_create_event_types_table.php deleted file mode 100644 index e28e2ba3c..000000000 --- a/database/migrations/2014_02_09_144436_create_event_types_table.php +++ /dev/null @@ -1,39 +0,0 @@ -increments('id'); - - $table->string('name'); - - $table->string('colour') - ->nullable(); - - $table->timestamps(); - - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('event_types'); - } - -} \ No newline at end of file diff --git a/database/migrations/2014_02_09_144536_create_events_table.php b/database/migrations/2014_02_09_144536_create_events_table.php deleted file mode 100644 index bf9b14448..000000000 --- a/database/migrations/2014_02_09_144536_create_events_table.php +++ /dev/null @@ -1,53 +0,0 @@ -increments('id'); - - $table->string('name'); - - $table->text('description') - ->nullable(); - - $table->timestamp('start'); - - $table->timestamp('end'); - - $table->integer('event_type_id') - ->unsigned() - ->nullable(); - - $table->timestamps(); - - // Relationships - $table->foreign('event_type_id') - ->references('id') - ->on('event_types') - ->onUpdate('cascade') - ->onDelete('set null'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('events'); - } - -} \ No newline at end of file diff --git a/database/migrations/2014_02_15_153129_add_event_signup_times.php b/database/migrations/2014_02_15_153129_add_event_signup_times.php deleted file mode 100644 index 94dd3a0c6..000000000 --- a/database/migrations/2014_02_15_153129_add_event_signup_times.php +++ /dev/null @@ -1,38 +0,0 @@ -timestamp('signup_opens') - ->after('end') - ->nullable(); - $table->timestamp('signup_closes') - ->after('signup_opens') - ->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('events', function ($table) { - $table->dropColumn('signup_opens'); - $table->dropColumn('signup_closes'); - }); - } - -} diff --git a/database/migrations/2014_02_15_175719_create_event_signups_table.php b/database/migrations/2014_02_15_175719_create_event_signups_table.php deleted file mode 100644 index 327540230..000000000 --- a/database/migrations/2014_02_15_175719_create_event_signups_table.php +++ /dev/null @@ -1,52 +0,0 @@ -increments('id'); - - $table->integer('event_id') - ->unsigned(); - - $table->integer('user_id') - ->unsigned(); - - $table->timestamps(); - - // Relationships - $table->foreign('event_id') - ->references('id') - ->on('events') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('event_signups'); - } - -} diff --git a/database/migrations/2014_03_12_174145_create_playlists_table.php b/database/migrations/2014_03_12_174145_create_playlists_table.php deleted file mode 100644 index bc2c85a2f..000000000 --- a/database/migrations/2014_03_12_174145_create_playlists_table.php +++ /dev/null @@ -1,36 +0,0 @@ -increments('id'); - - $table->string('name'); - - $table->timestamps(); - - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('playlists'); - } - -} diff --git a/database/migrations/2014_03_12_174313_create_playlist_items_table.php b/database/migrations/2014_03_12_174313_create_playlist_items_table.php deleted file mode 100644 index fa9101647..000000000 --- a/database/migrations/2014_03_12_174313_create_playlist_items_table.php +++ /dev/null @@ -1,63 +0,0 @@ -increments('id'); - - $table->integer('playlist_id') - ->unsigned(); - - $table->integer('user_id') - ->unsigned(); - - $table->text('url'); - - $table->string('title'); - - $table->integer('playback_state') - ->default(0) - ->unsigned(); - - $table->integer('duration') - ->unsigned(); - - $table->timestamps(); - - // Relationships - $table->foreign('playlist_id') - ->references('id') - ->on('playlists') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('playlist_items'); - } - -} diff --git a/database/migrations/2014_03_25_183319_add_playlist_playback_state.php b/database/migrations/2014_03_25_183319_add_playlist_playback_state.php deleted file mode 100644 index b1eae2432..000000000 --- a/database/migrations/2014_03_25_183319_add_playlist_playback_state.php +++ /dev/null @@ -1,35 +0,0 @@ -integer('playback_state') - ->default(0) - ->unsigned() - ->after('name'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('playlists', function ($table) { - $table->dropColumn('playback_state'); - }); - } - -} \ No newline at end of file diff --git a/database/migrations/2014_04_14_212719_add_steam_user_visibility_field.php b/database/migrations/2014_04_14_212719_add_steam_user_visibility_field.php deleted file mode 100644 index 73067f6ef..000000000 --- a/database/migrations/2014_04_14_212719_add_steam_user_visibility_field.php +++ /dev/null @@ -1,35 +0,0 @@ -integer('steam_visibility') - ->default(1) - ->unsigned() - ->after('steam_id_64'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function ($table) { - $table->dropColumn('steam_visibility'); - }); - } - -} \ No newline at end of file diff --git a/database/migrations/2014_04_27_161926_add_playlist_item_skip_reason_field.php b/database/migrations/2014_04_27_161926_add_playlist_item_skip_reason_field.php deleted file mode 100644 index b9d6bd0c9..000000000 --- a/database/migrations/2014_04_27_161926_add_playlist_item_skip_reason_field.php +++ /dev/null @@ -1,34 +0,0 @@ -string('skip_reason') - ->nullable() - ->after('duration'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('playlist_items', function ($table) { - $table->dropColumn('skip_reason'); - }); - } - -} \ No newline at end of file diff --git a/database/migrations/2014_05_03_153542_create_playlist_item_votes_table.php b/database/migrations/2014_05_03_153542_create_playlist_item_votes_table.php deleted file mode 100644 index 18ab2f797..000000000 --- a/database/migrations/2014_05_03_153542_create_playlist_item_votes_table.php +++ /dev/null @@ -1,54 +0,0 @@ -increments('id'); - - $table->integer('playlist_item_id') - ->unsigned(); - - $table->integer('user_id') - ->unsigned(); - - $table->tinyInteger('vote'); // -1 for downvote, +1 for upvote - - $table->timestamps(); - - // Relationships - $table->foreign('playlist_item_id') - ->references('id') - ->on('playlist_items') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('playlist_item_votes'); - } - -} \ No newline at end of file diff --git a/database/migrations/2014_05_12_204815_create_achievements_tables.php b/database/migrations/2014_05_12_204815_create_achievements_tables.php deleted file mode 100644 index be6acfe09..000000000 --- a/database/migrations/2014_05_12_204815_create_achievements_tables.php +++ /dev/null @@ -1,102 +0,0 @@ -increments('id') - ->unsigned(); - - $table->string('name'); - - $table->string('description') - ->nullable(); - - $table->text('image') - ->nullable(); - - $table->tinyInteger('visible') - ->default(1) - ->unsigned(); - - $table->timestamps(); - - }); - - Schema::create('lans', function ($table) { - // Fields - $table->increments('id') - ->unsigned(); - - $table->string('name'); - - $table->timestamp('start'); - - $table->timestamp('end'); - - $table->timestamps(); - - }); - - Schema::create('awards', function ($table) { - // Fields - $table->increments('id') - ->unsigned(); - - $table->integer('user_id') - ->unsigned(); - - $table->integer('achievement_id') - ->unsigned(); - - $table->integer('lan_id') - ->unsigned() - ->nullable(); - - $table->timestamps(); - - // Relationships - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('achievement_id') - ->references('id') - ->on('achievements') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('lan_id') - ->references('id') - ->on('lans') - ->onUpdate('cascade') - ->onDelete('set null'); - - }); - - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('awards'); - Schema::drop('achievements'); - Schema::drop('lans'); - } -} \ No newline at end of file diff --git a/database/migrations/2014_05_18_110935_add_user_visible_field.php b/database/migrations/2014_05_18_110935_add_user_visible_field.php deleted file mode 100644 index 5cc9dd841..000000000 --- a/database/migrations/2014_05_18_110935_add_user_visible_field.php +++ /dev/null @@ -1,35 +0,0 @@ -integer('visible') - ->default(1) - ->unsigned() - ->after('avatar'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function ($table) { - $table->dropColumn('visible'); - }); - } - -} diff --git a/database/migrations/2014_05_18_123108_add_user_remember_token.php b/database/migrations/2014_05_18_123108_add_user_remember_token.php deleted file mode 100644 index d416f0266..000000000 --- a/database/migrations/2014_05_18_123108_add_user_remember_token.php +++ /dev/null @@ -1,33 +0,0 @@ -string('remember_token', 100) - ->after('visible'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function ($table) { - $table->dropColumn('remember_token'); - }); - } - -} diff --git a/database/migrations/2014_06_10_194607_add_playlist_settings_fields.php b/database/migrations/2014_06_10_194607_add_playlist_settings_fields.php deleted file mode 100644 index e5f7633ed..000000000 --- a/database/migrations/2014_06_10_194607_add_playlist_settings_fields.php +++ /dev/null @@ -1,40 +0,0 @@ -tinyInteger('max_duplicates') - ->unsigned() - ->default(0) - ->after('playback_state'); - $table->integer('max_item_duration') - ->unsigned() - ->default(600)// 10 minutes - ->after('playback_state'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('playlists', function ($table) { - $table->dropColumn('max_duplicates'); - $table->dropColumn('max_item_duration'); - }); - } - -} diff --git a/database/migrations/2014_06_10_220201_add_playlist_skip_percent_field.php b/database/migrations/2014_06_10_220201_add_playlist_skip_percent_field.php deleted file mode 100644 index 44bde6b69..000000000 --- a/database/migrations/2014_06_10_220201_add_playlist_skip_percent_field.php +++ /dev/null @@ -1,34 +0,0 @@ -decimal('user_skip_threshold', 2, 2)// decimal percentage - ->default(0.5)// 50% of active sessions - ->after('max_duplicates'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('playlists', function ($table) { - $table->dropColumn('user_skip_threshold'); - }); - } - -} diff --git a/database/migrations/2014_06_12_194550_add_playlist_item_played_at_timestamp.php b/database/migrations/2014_06_12_194550_add_playlist_item_played_at_timestamp.php deleted file mode 100644 index dd76765b3..000000000 --- a/database/migrations/2014_06_12_194550_add_playlist_item_played_at_timestamp.php +++ /dev/null @@ -1,34 +0,0 @@ -timestamp('played_at') - ->nullable() - ->after('skip_reason'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('playlist_items', function ($table) { - $table->dropColumn('played_at'); - }); - } - -} diff --git a/database/migrations/2014_06_22_203017_add_role_user_timestamps.php b/database/migrations/2014_06_22_203017_add_role_user_timestamps.php deleted file mode 100644 index d92741e98..000000000 --- a/database/migrations/2014_06_22_203017_add_role_user_timestamps.php +++ /dev/null @@ -1,33 +0,0 @@ -timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('role_user', function ($table) { - $table->dropColumn('created_at'); - $table->dropColumn('updated_at'); - }); - } - -} diff --git a/database/migrations/2014_09_28_140409_add_playlist_description_field.php b/database/migrations/2014_09_28_140409_add_playlist_description_field.php deleted file mode 100644 index 78cbd1562..000000000 --- a/database/migrations/2014_09_28_140409_add_playlist_description_field.php +++ /dev/null @@ -1,33 +0,0 @@ -string('description') - ->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('playlists', function ($table) { - $table->dropColumn('description'); - }); - } - -} diff --git a/database/migrations/2014_11_16_224418_change_playlist_max_duplicates.php b/database/migrations/2014_11_16_224418_change_playlist_max_duplicates.php deleted file mode 100644 index 0f78eb167..000000000 --- a/database/migrations/2014_11_16_224418_change_playlist_max_duplicates.php +++ /dev/null @@ -1,42 +0,0 @@ -dropColumn('max_duplicates'); - $table->tinyInteger('max_item_duplicates') - ->unsigned() - ->default(0) - ->after('max_item_duration'); - - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('playlists', function ($table) { - - $table->dropColumn('max_item_duplicates'); - $table->tinyInteger('max_duplicates') - ->unsigned() - ->default(0) - ->after('playback_state'); - }); - } - -} diff --git a/database/migrations/2014_11_16_230112_change_user_skip_threshold.php b/database/migrations/2014_11_16_230112_change_user_skip_threshold.php deleted file mode 100644 index cd368ffd2..000000000 --- a/database/migrations/2014_11_16_230112_change_user_skip_threshold.php +++ /dev/null @@ -1,34 +0,0 @@ -dropColumn('user_skip_threshold'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('playlists', function ($table) { - $table->decimal('user_skip_threshold', 2, 2)// decimal percentage - ->default(0.5)// 50% of active sessions - ->after('max_item_duplicates'); - }); - } - -} diff --git a/database/migrations/2014_11_16_230122_change_user_skip_threshold_pt2.php b/database/migrations/2014_11_16_230122_change_user_skip_threshold_pt2.php deleted file mode 100644 index 3af92e62e..000000000 --- a/database/migrations/2014_11_16_230122_change_user_skip_threshold_pt2.php +++ /dev/null @@ -1,35 +0,0 @@ -tinyInteger('user_skip_threshold') - ->unsigned() - ->default(50) - ->after('max_item_duplicates'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('playlists', function ($table) { - $table->dropColumn('user_skip_threshold'); - }); - } - -} diff --git a/database/migrations/2014_11_16_230214_move_playlist_description.php b/database/migrations/2014_11_16_230214_move_playlist_description.php deleted file mode 100644 index c872372da..000000000 --- a/database/migrations/2014_11_16_230214_move_playlist_description.php +++ /dev/null @@ -1,28 +0,0 @@ -dropColumn('max_item_duplicates'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('playlists', function ($table) { - $table->tinyInteger('max_item_duplicates') - ->unsigned() - ->default(0) - ->after('max_item_duration'); - }); - } - -} diff --git a/database/migrations/2014_11_30_033228_remove_achievement_visible_field.php b/database/migrations/2014_11_30_033228_remove_achievement_visible_field.php deleted file mode 100644 index 4aa4ab5ce..000000000 --- a/database/migrations/2014_11_30_033228_remove_achievement_visible_field.php +++ /dev/null @@ -1,34 +0,0 @@ -dropColumn('visible'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('achievements', function ($table) { - $table->tinyInteger('visible') - ->default(1) - ->unsigned(); - }); - } - -} diff --git a/database/migrations/2014_11_30_035228_remove_achievement_image_field.php b/database/migrations/2014_11_30_035228_remove_achievement_image_field.php deleted file mode 100644 index 898158066..000000000 --- a/database/migrations/2014_11_30_035228_remove_achievement_image_field.php +++ /dev/null @@ -1,33 +0,0 @@ -dropColumn('image'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('achievements', function ($table) { - $table->text('image') - ->nullable(); - }); - } - -} diff --git a/database/migrations/2014_11_30_043232_disallow_null_achievement_description.php b/database/migrations/2014_11_30_043232_disallow_null_achievement_description.php deleted file mode 100644 index 998aeffa3..000000000 --- a/database/migrations/2014_11_30_043232_disallow_null_achievement_description.php +++ /dev/null @@ -1,28 +0,0 @@ -dropColumn('vote'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('playlist_item_votes', function ($table) { - $table->tinyInteger('vote'); // -1 for downvote, +1 for upvote - }); - } - -} diff --git a/database/migrations/2014_11_30_140720_change_playlist_playback_state_default.php b/database/migrations/2014_11_30_140720_change_playlist_playback_state_default.php deleted file mode 100644 index 351c837a3..000000000 --- a/database/migrations/2014_11_30_140720_change_playlist_playback_state_default.php +++ /dev/null @@ -1,28 +0,0 @@ -increments('id') - ->unsigned(); - - $table->integer('user_id') - ->unsigned(); - - $table->integer('achievement_id') - ->unsigned(); - - $table->integer('lan_id') - ->unsigned(); - - $table->timestamps(); - - // Relationships - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('achievement_id') - ->references('id') - ->on('achievements') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('lan_id') - ->references('id') - ->on('lans') - ->onUpdate('cascade') - ->onDelete('cascade'); - - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('user_achievements'); - - Schema::create('awards', function ($table) { - // Fields - $table->increments('id') - ->unsigned(); - - $table->integer('user_id') - ->unsigned(); - - $table->integer('achievement_id') - ->unsigned(); - - $table->integer('lan_id') - ->unsigned() - ->nullable(); - - $table->timestamps(); - - // Relationships - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('achievement_id') - ->references('id') - ->on('achievements') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('lan_id') - ->references('id') - ->on('lans') - ->onUpdate('cascade') - ->onDelete('set null'); - - }); - } - -} diff --git a/database/migrations/2014_12_06_215115_rename_role_user_table.php b/database/migrations/2014_12_06_215115_rename_role_user_table.php deleted file mode 100644 index c9f5b34a4..000000000 --- a/database/migrations/2014_12_06_215115_rename_role_user_table.php +++ /dev/null @@ -1,79 +0,0 @@ -increments('id'); - - $table->integer('user_id') - ->unsigned(); - - $table->integer('role_id') - ->unsigned(); - - $table->timestamps(); - - // Relationships - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('role_id') - ->references('id') - ->on('roles') - ->onUpdate('cascade') - ->onDelete('cascade'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('user_roles'); - Schema::create('role_user', function ($table) { - // Fields - $table->increments('id'); - - $table->integer('user_id') - ->unsigned(); - - $table->integer('role_id') - ->unsigned(); - - $table->timestamps(); - - // Relationships - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('role_id') - ->references('id') - ->on('roles') - ->onUpdate('cascade') - ->onDelete('cascade'); - }); - } - -} diff --git a/database/migrations/2014_12_08_223752_rename_info_pages_table.php b/database/migrations/2014_12_08_223752_rename_info_pages_table.php deleted file mode 100644 index 10fa415cb..000000000 --- a/database/migrations/2014_12_08_223752_rename_info_pages_table.php +++ /dev/null @@ -1,72 +0,0 @@ -increments('id'); - - $table->integer('parent_id') - ->nullable() - ->unsigned(); - - $table->string('title'); - - $table->text('content') - ->nullable(); - - $table->timestamps(); - - // Relationships - $table->foreign('parent_id') - ->references('id') - ->on('pages') - ->onUpdate('cascade') - ->onDelete('set null'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('pages'); - Schema::create('info_pages', function ($table) { - // Fields - $table->increments('id'); - - $table->integer('parent_id') - ->nullable() - ->unsigned(); - - $table->string('title'); - - $table->text('content') - ->nullable(); - - $table->timestamps(); - - // Relationships - $table->foreign('parent_id') - ->references('id') - ->on('info_pages') - ->onUpdate('cascade') - ->onDelete('set null'); - }); - } - -} diff --git a/database/migrations/2014_12_19_234213_add_user_api_key_field.php b/database/migrations/2014_12_19_234213_add_user_api_key_field.php deleted file mode 100644 index ef55cb7ee..000000000 --- a/database/migrations/2014_12_19_234213_add_user_api_key_field.php +++ /dev/null @@ -1,33 +0,0 @@ -string('api_key', 32) - ->after('visible'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function ($table) { - $table->dropColumn('api_key'); - }); - } - -} diff --git a/database/migrations/2015_03_15_160401_playlist_items_remove_played_at_field.php b/database/migrations/2015_03_15_160401_playlist_items_remove_played_at_field.php deleted file mode 100644 index 55ec9221e..000000000 --- a/database/migrations/2015_03_15_160401_playlist_items_remove_played_at_field.php +++ /dev/null @@ -1,34 +0,0 @@ -dropColumn('played_at'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('playlist_items', function ($table) { - $table->timestamp('played_at') - ->nullable() - ->after('skip_reason'); - }); - } - -} diff --git a/database/migrations/2015_04_06_175539_change_events_table_event_type.php b/database/migrations/2015_04_06_175539_change_events_table_event_type.php deleted file mode 100644 index 22589bfbe..000000000 --- a/database/migrations/2015_04_06_175539_change_events_table_event_type.php +++ /dev/null @@ -1,32 +0,0 @@ -integer('assigned_by') - ->unsigned() - ->nullable() - ->after('role_id'); - - $table->foreign('assigned_by') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('set null'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('user_roles', function ($table) { - $table->dropForeign('user_roles_assigned_by_foreign'); - $table->dropColumn('assigned_by'); - }); - } - -} diff --git a/database/migrations/2015_04_12_011503_add_page_position_field.php b/database/migrations/2015_04_12_011503_add_page_position_field.php deleted file mode 100644 index 2e2f593e8..000000000 --- a/database/migrations/2015_04_12_011503_add_page_position_field.php +++ /dev/null @@ -1,35 +0,0 @@ -integer('position') - ->unsigned() - ->nullable() - ->after('content'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('pages', function ($table) { - $table->dropColumn('position'); - }); - } - -} diff --git a/database/migrations/2015_04_12_195732_create_logs_table.php b/database/migrations/2015_04_12_195732_create_logs_table.php deleted file mode 100644 index 0ffba0aa8..000000000 --- a/database/migrations/2015_04_12_195732_create_logs_table.php +++ /dev/null @@ -1,35 +0,0 @@ -increments('id'); - $table->string('php_sapi_name'); - $table->string('level'); - $table->text('message'); - $table->text('context'); - $table->timestamp('created_at'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('logs'); - } - -} diff --git a/database/migrations/2015_04_19_123122_add_page_published_field.php b/database/migrations/2015_04_19_123122_add_page_published_field.php deleted file mode 100644 index 9b5892467..000000000 --- a/database/migrations/2015_04_19_123122_add_page_published_field.php +++ /dev/null @@ -1,35 +0,0 @@ -integer('published') - ->default(1) - ->unsigned() - ->after('position'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('pages', function ($table) { - $table->dropColumn('published'); - }); - } - -} diff --git a/database/migrations/2015_04_19_151602_add_event_published_field.php b/database/migrations/2015_04_19_151602_add_event_published_field.php deleted file mode 100644 index 30c76bcd7..000000000 --- a/database/migrations/2015_04_19_151602_add_event_published_field.php +++ /dev/null @@ -1,35 +0,0 @@ -integer('published') - ->default(1) - ->unsigned() - ->after('event_type_id'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('events', function ($table) { - $table->dropColumn('published'); - }); - } - -} diff --git a/database/migrations/2015_06_12_220859_drop_playlist_tables.php b/database/migrations/2015_06_12_220859_drop_playlist_tables.php deleted file mode 100644 index 38d1aebc7..000000000 --- a/database/migrations/2015_06_12_220859_drop_playlist_tables.php +++ /dev/null @@ -1,120 +0,0 @@ -increments('id') - ->unsigned(); - - $table->string('name'); - - $table->string('description') - ->nullable(); - - $table->integer('playback_state') - ->unsigned() - ->default(1); - - $table->integer('max_item_duration') - ->unsigned() - ->default(60); - - $table->integer('user_skip_threshold') - ->unsigned() - ->default(50); - - $table->timestamps(); - - }); - - Schema::create('playlist_items', function ($table) { - // Fields - $table->increments('id'); - - $table->integer('playlist_id') - ->unsigned(); - - $table->integer('user_id') - ->unsigned(); - - $table->text('url'); - - $table->string('title'); - - $table->integer('playback_state') - ->default(0) - ->unsigned(); - - $table->integer('duration') - ->unsigned(); - - $table->string('skip_reason') - ->nullable(); - - $table->timestamps(); - - // Relationships - $table->foreign('playlist_id') - ->references('id') - ->on('playlists') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - }); - - Schema::create('playlist_item_votes', function ($table) { - // Fields - $table->increments('id'); - - $table->integer('playlist_item_id') - ->unsigned(); - - $table->integer('user_id') - ->unsigned(); - - $table->timestamps(); - - // Relationships - $table->foreign('playlist_item_id') - ->references('id') - ->on('playlist_items') - ->onUpdate('cascade') - ->onDelete('cascade'); - - $table->foreign('user_id') - ->references('id') - ->on('users') - ->onUpdate('cascade') - ->onDelete('cascade'); - }); - } - -} diff --git a/database/migrations/2018_11_17_180942_release_v0_5_3.php b/database/migrations/2018_11_17_180942_release_v0_5_3.php new file mode 100644 index 000000000..a6a03c49f --- /dev/null +++ b/database/migrations/2018_11_17_180942_release_v0_5_3.php @@ -0,0 +1,306 @@ +count() != 0) { + return; + } + + Schema::create('users', function ($table) { + $table->increments('id'); + $table->string('username', 32); + $table->string('steam_id_64', 17) + ->unique(); + $table->integer('steam_visibility') + ->default(1) + ->unsigned(); + $table->string('ip', 15); + $table->string('avatar', 255); + $table->integer('visible') + ->default(1) + ->unsigned(); + $table->string('api_key', 32); + $table->string('remember_token', 100); + $table->timestamps(); + }); + Schema::create('achievements', function ($table) { + $table->increments('id'); + $table->string('name'); + $table->string('description'); + $table->timestamps(); + }); + Schema::create('applications', function ($table) { + $table->increments('id'); + $table->string('name'); + $table->integer('steam_app_id') + ->unique(); + $table->timestamps(); + }); + Schema::create('event_types', function ($table) { + $table->increments('id'); + $table->string('name'); + $table->string('colour') + ->nullable(); + $table->timestamps(); + }); + Schema::create('lans', function ($table) { + $table->increments('id'); + $table->string('name'); + $table->timestamp('start'); + $table->timestamp('end'); + $table->timestamps(); + }); + Schema::create('logs', function ($table) { + $table->increments('id'); + $table->string('php_sapi_name'); + $table->string('level'); + $table->text('message'); + $table->text('context'); + $table->timestamp('created_at'); + }); + Schema::create('permissions', function ($table) { + $table->increments('id'); + $table->integer('user_id') + ->unsigned(); + $table->string('type'); + $table->string('action'); + $table->string('resource'); + $table->timestamps(); + $table->foreign('user_id') + ->references('id') + ->on('users') + ->onUpdate('cascade') + ->onDelete('cascade'); + }); + Schema::create('roles', function ($table) { + $table->increments('id'); + $table->string('name'); + $table->timestamps(); + }); + Schema::create('events', function ($table) { + $table->increments('id'); + $table->string('name'); + $table->text('description') + ->nullable(); + $table->timestamp('start'); + $table->timestamp('end'); + $table->timestamp('signup_opens') + ->nullable(); + $table->timestamp('signup_closes') + ->nullable(); + $table->integer('event_type_id') + ->unsigned(); + $table->integer('published') + ->default(1) + ->unsigned(); + $table->timestamps(); + $table->foreign('event_type_id') + ->references('id') + ->on('event_types'); + }); + Schema::create('event_signups', function ($table) { + $table->increments('id'); + $table->integer('event_id') + ->unsigned(); + $table->integer('user_id') + ->unsigned(); + $table->timestamps(); + $table->foreign('event_id') + ->references('id') + ->on('events') + ->onUpdate('cascade') + ->onDelete('cascade'); + $table->foreign('user_id') + ->references('id') + ->on('users') + ->onUpdate('cascade') + ->onDelete('cascade'); + }); + Schema::create('pages', function ($table) { + $table->increments('id'); + $table->integer('parent_id') + ->nullable() + ->unsigned(); + $table->string('title'); + $table->text('content') + ->nullable(); + $table->integer('position') + ->unsigned() + ->nullable(); + $table->integer('published') + ->default(1) + ->unsigned(); + $table->timestamps(); + $table->foreign('parent_id') + ->references('id') + ->on('pages') + ->onUpdate('cascade') + ->onDelete('set null'); + }); + Schema::create('servers', function ($table) { + $table->increments('id'); + $table->integer('application_id') + ->unsigned(); + $table->string('name') + ->nullable(); + $table->string('address'); // ipv4, hostname or ipv6 + $table->string('port'); + $table->boolean('pinned'); + $table->timestamps(); + $table->foreign('application_id') + ->references('id') + ->on('applications') + ->onUpdate('cascade') + ->onDelete('cascade'); + }); + Schema::create('sessions', function ($table) { + $table->string('id') + ->unique(); + $table->text('payload'); + $table->integer('last_activity'); + }); + Schema::create('shouts', function ($table) { + $table->increments('id'); + $table->integer('user_id') + ->unsigned(); + $table->string('content'); + $table->boolean('pinned'); + $table->timestamps(); + $table->foreign('user_id') + ->references('id') + ->on('users') + ->onUpdate('cascade') + ->onDelete('cascade'); + }); + Schema::create('user_roles', function ($table) { + $table->increments('id'); + $table->integer('user_id') + ->unsigned(); + $table->integer('role_id') + ->unsigned(); + $table->integer('assigned_by') + ->unsigned() + ->nullable(); + $table->timestamps(); + $table->foreign('user_id') + ->references('id') + ->on('users') + ->onUpdate('cascade') + ->onDelete('cascade'); + $table->foreign('role_id') + ->references('id') + ->on('roles') + ->onUpdate('cascade') + ->onDelete('cascade'); + $table->foreign('assigned_by') + ->references('id') + ->on('users') + ->onUpdate('cascade') + ->onDelete('set null'); + }); + Schema::create('user_achievements', function ($table) { + $table->increments('id') + ->unsigned(); + $table->integer('user_id') + ->unsigned(); + $table->integer('achievement_id') + ->unsigned(); + $table->integer('lan_id') + ->unsigned() + ->nullable(); + $table->timestamps(); + $table->foreign('user_id') + ->references('id') + ->on('users') + ->onUpdate('cascade') + ->onDelete('cascade'); + $table->foreign('achievement_id') + ->references('id') + ->on('achievements') + ->onUpdate('cascade') + ->onDelete('cascade'); + $table->foreign('lan_id') + ->references('id') + ->on('lans') + ->onUpdate('cascade') + ->onDelete('set null'); + }); + Schema::create('states', function ($table) { + $table->increments('id'); + $table->integer('user_id') + ->unsigned(); + $table->integer('application_id') + ->unsigned() + ->nullable(); // nullable to prevent circular dependencies + $table->integer('server_id') + ->unsigned() + ->nullable(); // nullable to prevent circular dependencies + $table->smallInteger('status') + ->unsigned(); + $table->timestamps(); + $table->foreign('user_id') + ->references('id') + ->on('users') + ->onUpdate('cascade') + ->onDelete('cascade'); + $table->foreign('application_id') + ->references('id') + ->on('applications') + ->onUpdate('cascade') + ->onDelete('set null'); + $table->foreign('server_id') + ->references('id') + ->on('servers') + ->onUpdate('cascade') + ->onDelete('set null'); + $table->index(['user_id', 'created_at']); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // Skip dropping all tables if the database structure was created + // by previous versions of LANager's non-consolidated migration files + // rather than this consolidated migration + if(DB::table('migrations')->count() != 1) { + return; + } + + Schema::drop('states'); + Schema::drop('user_achievements'); + Schema::drop('user_roles'); + Schema::drop('shouts'); + Schema::drop('sessions'); + Schema::drop('servers'); + Schema::drop('pages'); + Schema::drop('event_signups'); + Schema::drop('events'); + Schema::drop('roles'); + Schema::drop('permissions'); + Schema::drop('logs'); + Schema::drop('lans'); + Schema::drop('event_types'); + Schema::drop('applications'); + Schema::drop('achievements'); + Schema::drop('users'); + } + +}