Compare commits
470 Commits
feature/or
...
main
Author | SHA1 | Date |
---|---|---|
|
e455e6228c | |
|
ed13a7adec | |
|
4a9749c97c | |
|
fbb694581e | |
|
8d61a564a4 | |
|
6a24fa1017 | |
|
39a78feabe | |
|
c259dc6b32 | |
|
154472ac30 | |
|
351f952cba | |
|
aaa8854839 | |
|
b1fbc4787a | |
|
0cce7ff52d | |
|
eec19314ee | |
|
be23dd538b | |
|
290cbb0ae0 | |
|
9a96b04e7f | |
|
4578f29349 | |
|
6867f74098 | |
|
1bca31ec5f | |
|
927677ddc0 | |
|
097c6a710e | |
|
b6c62996f5 | |
|
beeda955ef | |
|
d8306f78a7 | |
|
e119c14451 | |
|
912cf9b008 | |
|
bc036b65cf | |
|
2d6b058eaf | |
|
421f5ff78e | |
|
e3d8a520ca | |
|
8b9328b6a3 | |
|
46bd3a68dc | |
|
3eca490d0a | |
|
52a0493285 | |
|
24a414ab66 | |
|
6b228b146b | |
|
e646b4b1e9 | |
|
fbe20ba735 | |
|
9c8697740e | |
|
84d757415c | |
|
bbb9239f02 | |
|
27615adc98 | |
|
aa62d31b62 | |
|
a06a0998f9 | |
|
2f813099c5 | |
|
a2e0ced906 | |
|
5be87008c4 | |
|
7cc0a44650 | |
|
18f3512e5b | |
|
1f4a88df0f | |
|
dd81706e18 | |
|
ec7006db9a | |
|
7b186b55d6 | |
|
c2fed1fb15 | |
|
b41c489ce3 | |
|
e4287b97a6 | |
|
56ff5c0936 | |
|
b850940b43 | |
|
1dea1b56cf | |
|
4a76186e97 | |
|
ca79698e87 | |
|
14f662a2a6 | |
|
5373feed3c | |
|
c6becd3bbd | |
|
3b854f822e | |
|
57ad3b849c | |
|
fc91dd08ac | |
|
6ce1f99a3e | |
|
02542d23e1 | |
|
24f03e4f01 | |
|
eb2c366e59 | |
|
1f8dedb274 | |
|
4dbedd28d6 | |
|
88ffad3841 | |
|
010a7f917d | |
|
721ad0d591 | |
|
8bc9cb1006 | |
|
663b0d1928 | |
|
4051497761 | |
|
5a63a1fb88 | |
|
868a015902 | |
|
b534738587 | |
|
f94f8fe3e5 | |
|
94721d4371 | |
|
fca9bb3ae3 | |
|
b9e894f2d0 | |
|
7c37bd418a | |
|
350dcd1d24 | |
|
dc9e21b61e | |
|
b180d32843 | |
|
ece5763f0a | |
|
b0bf22a2eb | |
|
2f8b4bb320 | |
|
e06f681464 | |
|
629da7ca1a | |
|
73b5914baa | |
|
6ed2d7a936 | |
|
1e76956b96 | |
|
a0e8dc2297 | |
|
0ecc69e362 | |
|
a5d58fa78d | |
|
70bf6fc534 | |
|
0cf373303a | |
|
b04932cea2 | |
|
90c84e4a9f | |
|
8e21a10361 | |
|
6b26b78995 | |
|
b3b3bf892d | |
|
a00dc7a59f | |
|
d881c763cf | |
|
c3ebc64264 | |
|
934a1f1853 | |
|
ba8cdf81f7 | |
|
3ebe5cb1bc | |
|
d2961b4439 | |
|
560559bba9 | |
|
704b844d7e | |
|
9292be3feb | |
|
f9feafa9b8 | |
|
2738ae8b75 | |
|
7098d4fcb1 | |
|
ac8f6d1028 | |
|
819ec6a25d | |
|
aedffb5596 | |
|
051bdeb646 | |
|
9089224522 | |
|
546546bb42 | |
|
ca3e547b56 | |
|
4fd3a78c0a | |
|
ce61d3cfc2 | |
|
083aa9db7e | |
|
64e721cd09 | |
|
626dc276a8 | |
|
b98d6d2be8 | |
|
de165935e0 | |
|
6772c9d191 | |
|
60f6348eca | |
|
e9b982ffe4 | |
|
947817daae | |
|
b2f5c3802a | |
|
b94e6e2cf2 | |
|
d61be99b84 | |
|
7ede1a646a | |
|
3ed65f0668 | |
|
a448fb071d | |
|
acf772f139 | |
|
c381b32d09 | |
|
ed614c4ac4 | |
|
dde936be67 | |
|
7ff5c87884 | |
|
28914fd7de | |
|
dc68c8eb43 | |
|
31657113a8 | |
|
3bde0333d7 | |
|
81bb1c5268 | |
|
d5c75f6c45 | |
|
95b85ccca1 | |
|
10a89da948 | |
|
935240809e | |
|
afffe5cdb1 | |
|
391c455dd0 | |
|
d157d98fb3 | |
|
e0dfcd0f63 | |
|
f22fde5ecd | |
|
f3eb00fa95 | |
|
89d9e07521 | |
|
e3c543c6c1 | |
|
6d3604565b | |
|
2cadfbf1e3 | |
|
cd94a3065e | |
|
627bf75468 | |
|
3c7fa26e32 | |
|
e421a38079 | |
|
5728fb4d94 | |
|
820edfdff0 | |
|
34c8fe2d1a | |
|
b4d3ff5e89 | |
|
20c243fb52 | |
|
2aa34ebec4 | |
|
25d6da01fc | |
|
9677cb7b46 | |
|
a8d22cfac0 | |
|
74cb26d705 | |
|
46999dfbc7 | |
|
2b8ea31599 | |
|
4efa843445 | |
|
166c629906 | |
|
40c34a0112 | |
|
59ce82ef43 | |
|
825387d881 | |
|
fb381b9627 | |
|
094ff7d34c | |
|
3ad5b23e67 | |
|
4a26d7a880 | |
|
20b2ea0429 | |
|
38bf6e23ad | |
|
19c94561cd | |
|
529d1c37ca | |
|
6329ae9d2b | |
|
8949dcd865 | |
|
7b9650d804 | |
|
0002ea4ccc | |
|
7856741928 | |
|
2b90e2618d | |
|
e27e4b408f | |
|
0f52548284 | |
|
dd9cd5e2cf | |
|
e3b5bc202c | |
|
82c42f04f5 | |
|
c0f825f937 | |
|
e245a975a3 | |
|
54c0af3a24 | |
|
49259255dd | |
|
48b7225c01 | |
|
5c85d687e6 | |
|
942c967d44 | |
|
d3b2da5f1b | |
|
4638c07416 | |
|
1c13c8fe7d | |
|
c33528f78f | |
|
d11e6e0873 | |
|
4636a109d8 | |
|
bc5dd3060e | |
|
d06f29eda6 | |
|
f18c36b523 | |
|
4aeace65b5 | |
|
d3e7822206 | |
|
a2f35e8927 | |
|
fb0af325c2 | |
|
fed369eb1f | |
|
b0efe07977 | |
|
81da6b7a34 | |
|
1e998c9a3a | |
|
38eb3775f1 | |
|
eb5aff8e7f | |
|
80b39db993 | |
|
8094fdae3e | |
|
2f89e5bc57 | |
|
5c91265417 | |
|
8a512f603f | |
|
87d16e9d72 | |
|
404ee80d68 | |
|
116a773b6e | |
|
ace170f1c2 | |
|
0ace220ff6 | |
|
805fd70026 | |
|
03e36f6218 | |
|
aee03d6a85 | |
|
e0795743e7 | |
|
a0ae000dca | |
|
0545add493 | |
|
3bfd65e909 | |
|
3d0b4f25e2 | |
|
50f2fff71e | |
|
738dc55503 | |
|
5a7afc23b9 | |
|
9e4eebb38c | |
|
edee27994b | |
|
5dc8ffae8c | |
|
0908f1bbe9 | |
|
3ee70ef7e6 | |
|
45fd79d2bc | |
|
6da4997f51 | |
|
d4f8acae81 | |
|
6601a755a7 | |
|
8c30def21a | |
|
354b18c068 | |
|
4c76b9a71c | |
|
38cb3e7098 | |
|
1db829d9ff | |
|
4973be6af6 | |
|
f13731a047 | |
|
104d1dc8ac | |
|
436c297b73 | |
|
e9619575ae | |
|
5c43c43342 | |
|
bb37c7aea0 | |
|
8b8c57f8a4 | |
|
77ad48f717 | |
|
ad64bf3861 | |
|
0eeab3dc42 | |
|
e6024eb110 | |
|
e675af2b24 | |
|
541653689e | |
|
231d729682 | |
|
3bb426c6c3 | |
|
c9320fb658 | |
|
51500a4e35 | |
|
19f4430556 | |
|
b077a9d5a7 | |
|
dd031e033c | |
|
dc894ad22b | |
|
c8e0fe69c6 | |
|
7bbf84cc21 | |
|
80f2242b6c | |
|
d2e9732240 | |
|
33025e84ab | |
|
98f15df11d | |
|
d78e719a91 | |
|
73fbd6b6f6 | |
|
835d461585 | |
|
dce78eef29 | |
|
0c94a1921e | |
|
756bea4844 | |
|
14ff759309 | |
|
4aa03d643e | |
|
31750fe663 | |
|
3f933db43e | |
|
0ac01b8c4a | |
|
ba65454c38 | |
|
de5f719111 | |
|
a2171ceb47 | |
|
ef3bda1322 | |
|
88b3d8aaa9 | |
|
7e6a0a2a1b | |
|
5173dc81f0 | |
|
d5e36c6657 | |
|
f8bfffebf1 | |
|
4759f3e24f | |
|
8c57e61a57 | |
|
401898b262 | |
|
5b7998d47b | |
|
3c4d56727a | |
|
0ccecb786e | |
|
4ef9892472 | |
|
ecf406609a | |
|
f39abdc2ba | |
|
5da12033e8 | |
|
8fba590e9c | |
|
c58afe873f | |
|
5726fb0bae | |
|
9dab268a80 | |
|
b8efa6a19f | |
|
8806f0449c | |
|
1cfd1fdfee | |
|
8ff975743a | |
|
2ddaba51d9 | |
|
07b6f55310 | |
|
29a222bc96 | |
|
d3c43f4f81 | |
|
1e2947b183 | |
|
37b21c85a4 | |
|
7c90325471 | |
|
c32363c974 | |
|
ea35ddd1e4 | |
|
cdfab436d8 | |
|
c14002e220 | |
|
179f36ebef | |
|
ca23d41241 | |
|
feb239f3de | |
|
d135c74f8a | |
|
4b3f55f631 | |
|
3d78418415 | |
|
d75712428d | |
|
4f1bfa04f6 | |
|
4cfa700e91 | |
|
6be2832fe6 | |
|
7ab7738f7e | |
|
f6649231b6 | |
|
4ff77d7e2b | |
|
04cee6c4c0 | |
|
ecd559391e | |
|
b0189d8d9e | |
|
1750cbd60f | |
|
a7c70a287f | |
|
38674081d9 | |
|
72361355c4 | |
|
792eb8f7b9 | |
|
fc5fd7421b | |
|
440a5f8bf1 | |
|
ec86e867c3 | |
|
77ef4aca3f | |
|
5f6e2e8610 | |
|
f928a1db11 | |
|
7425b54940 | |
|
3db25efbcf | |
|
64848705b9 | |
|
4ca1c51e7a | |
|
784fbfe89c | |
|
4523135041 | |
|
083ac514a8 | |
|
bdd5093a6a | |
|
1394f3855b | |
|
34c2144ffd | |
|
d1105a1e89 | |
|
b4f9f1e9bb | |
|
794237dd90 | |
|
0f0b047c85 | |
|
d4101cda80 | |
|
8141d581c8 | |
|
e7b1444446 | |
|
1afe73bd09 | |
|
ad02456de6 | |
|
05214bbd2e | |
|
0219f28b5c | |
|
939a15ad2a | |
|
d955a7f434 | |
|
1883478bae | |
|
babd702f85 | |
|
8d67ccd78a | |
|
efdf60778a | |
|
8bfc471144 | |
|
aa1da83a70 | |
|
1b41814883 | |
|
5d9b347098 | |
|
07b419016e | |
|
ebd3d7e539 | |
|
2cf6730fbb | |
|
030d35f47e | |
|
68b460935f | |
|
d70d2cf3f0 | |
|
e7b303cc11 | |
|
a232d5cbd7 | |
|
6d1a2a89ea | |
|
cc1559ef08 | |
|
1d7ff4b210 | |
|
45dd18f55c | |
|
16ece4c2b6 | |
|
6094431a38 | |
|
f848c2691e | |
|
a604e6dfc4 | |
|
9574420180 | |
|
a54e9b113e | |
|
31b78736f2 | |
|
c6923d49fa | |
|
5859b47619 | |
|
e42f9613b2 | |
|
cb72571e39 | |
|
4b19793371 | |
|
59ce22e6f1 | |
|
ee779798bf | |
|
7e84855117 | |
|
16e3168c3c | |
|
ccb317fb15 | |
|
f88bb46f3e | |
|
6afce69f14 | |
|
c8a348449c | |
|
bae07e46a1 | |
|
782c345f43 | |
|
750e36ec99 | |
|
8e9db51cbc | |
|
8677fc0f94 | |
|
75ff3ff11c | |
|
fa2ee36cb9 | |
|
36863bff7b | |
|
f483b94a70 | |
|
159d38570a | |
|
b26b215ffc | |
|
3f5004dddd | |
|
aa2059b70c | |
|
524b833c0e | |
|
b44faa4b7f | |
|
960d225ed8 | |
|
7889554b36 | |
|
7cdf26c0a2 | |
|
b855557594 | |
|
1b22192d33 | |
|
3e0e593d03 | |
|
e2fad13710 | |
|
2e856947f2 | |
|
c9c0fbe863 | |
|
e11556174b | |
|
a256e6c92c | |
|
a182291936 | |
|
5bb75fd6a9 | |
|
d44882c59c | |
|
b6ade24314 | |
|
7ba4deaafa | |
|
020a731351 |
20
.env
20
.env
|
@ -24,7 +24,7 @@ APP_SECRET=e95c7f17da15ce1b03d77ad655379c34
|
|||
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
|
||||
#
|
||||
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
|
||||
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
|
||||
#DATABASE_URL="mysql://root:root@127.0.0.1:3336/dimio?serverVersion=8.0.32&charset=utf8mb4"
|
||||
DATABASE_URL="mysql://root:root@ogcore-database:3306/ogcore?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
|
||||
OG_1_DATABASE_URL="mysql://root:root@ogcore-database:3306/ogcore_old_og?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
|
||||
|
||||
|
@ -32,7 +32,7 @@ OG_1_DATABASE_URL="mysql://root:root@ogcore-database:3306/ogcore_old_og?serverVe
|
|||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
###> nelmio/cors-bundle ###
|
||||
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
|
||||
CORS_ALLOW_ORIGIN='*'
|
||||
###< nelmio/cors-bundle ###
|
||||
|
||||
###> lexik/jwt-authentication-bundle ###
|
||||
|
@ -40,3 +40,19 @@ JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
|
|||
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
|
||||
JWT_PASSPHRASE=8b9154df37ffa91ef9186ce095324e39e50ff3b023bb1ed34383abd019ba4515
|
||||
###< lexik/jwt-authentication-bundle ###
|
||||
|
||||
OGBOOT_API_URL=http://localhost:8085
|
||||
OGDHCP_API_URL=http://localhost:8085
|
||||
|
||||
###> UDS ###
|
||||
UDS_AUTH_LOGIN="Usuarios locales"
|
||||
UDS_AUTH_USERNAME="natiqindel"
|
||||
UDS_AUTH_PASSWORD="correct horse battery staple"
|
||||
UDS_URL=https://localhost:8087/uds/rest/
|
||||
###< UDS ###
|
||||
|
||||
###> symfony/mercure-bundle ###
|
||||
MERCURE_URL=http://ogcore-mercure:3000/.well-known/mercure
|
||||
MERCURE_PUBLIC_URL=http://ogcore-mercure:3000/.well-known/mercure
|
||||
MERCURE_JWT_SECRET="!ChangeThisMercureHubJWTSecretKey!"
|
||||
###< symfony/mercure-bundle ###
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
###> symfony/framework-bundle ###
|
||||
APP_ENV=prod
|
||||
APP_SECRET=e95c7f17da15ce1b03d77ad655379c34
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
###> doctrine/doctrine-bundle ###
|
||||
DATABASE_URL="mysql://root:root@127.0.0.1:3306/ogcore?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
|
||||
OG_1_DATABASE_URL="mysql://root:root@127.0.0.1:3306/ogcore_old_og?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
###> nelmio/cors-bundle ###
|
||||
CORS_ALLOW_ORIGIN='*'
|
||||
###< nelmio/cors-bundle ###
|
||||
|
||||
###> lexik/jwt-authentication-bundle ###
|
||||
JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem
|
||||
JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
|
||||
JWT_PASSPHRASE=8b9154df37ffa91ef9186ce095324e39e50ff3b023bb1ed34383abd019ba4515
|
||||
###< lexik/jwt-authentication-bundle ###
|
||||
|
||||
###> symfony/mercure-bundle ###
|
||||
MERCURE_URL=https://localhost:3000/.well-known/mercure
|
||||
MERCURE_PUBLIC_URL=https://localhost:3000/.well-known/mercure
|
||||
MERCURE_JWT_SECRET="!ChangeThisMercureHubJWTSecretKey!"
|
||||
###< symfony/mercure-bundle ###
|
|
@ -25,3 +25,11 @@
|
|||
/phpunit.xml
|
||||
.phpunit.result.cache
|
||||
###< phpunit/phpunit ###
|
||||
|
||||
### Debian packaging
|
||||
debian/ogcore
|
||||
debian/*.substvars
|
||||
debian/*.log
|
||||
debian/.debhelper/
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
# Changelog
|
||||
## [0.11.2] - 2025-04-23
|
||||
### Fixed
|
||||
- Se ha cambiado la forma en guardar la fecha al recibir "ping" de los clientes.
|
||||
|
||||
---
|
||||
## [0.11.1] - 2025-04-16
|
||||
### Fixed
|
||||
- Se ha corregido un error al crear imagen versionada. Si la particion de origen era diferente, no dejaba crear.
|
||||
- Error en la transmision de imagenes. No se actualizaba con la imagen versionada, si no con la canonica.
|
||||
|
||||
---
|
||||
## [0.11.0] - 2025-04-11
|
||||
### Added
|
||||
- Se ha añadido funcionalidad para renombrar imagenes en ogRepository. Nuevo sistema de versionado.
|
||||
- Se ha añadido la integracion con el ogAgent para poder ejecutar scripts.
|
||||
- Se ha añadido el poder añadir descripcion a una imagen.
|
||||
- Se han añadido 2 nuevos campos en la gestion de los repositorios: usuario y puerto ssh.
|
||||
- Se ha añadido funcionalidad para poder gestionar el estado de un equipo de manera automatica. En caso de no haber conexion con el cliente, la web sera notificada en un tiempo maximo de 5 min.
|
||||
|
||||
### Improved
|
||||
- Se han modificado los logs para que puedan "salir" por syslog ademas de por fichero.
|
||||
|
||||
### Fixed
|
||||
- Se ha corregido el bug que hacia que cuando habia demasiados clientes, no se mostraran en pantalla debido a un error de memoria.
|
||||
---
|
||||
|
||||
## [0.10.1] - 2025-03-25
|
||||
### Improved
|
||||
- Se ha modificado el script de creación de usuarios, añadiendole la opcion del tipo de visionalizacion por defecto de la vista "grupos".
|
||||
|
||||
## [0.10.0] - 2025-03-25
|
||||
### Added
|
||||
- Nuevo endpoint ogRepository. Convertir imagen en imagen virtual.
|
||||
- Nuevo endpoint ogRepository. Importar imágenes externas al sistema.
|
||||
- Nuevo método para desplegar imagenes sin cache.
|
||||
|
||||
---
|
||||
## [0.9.5] - 2025-03-19
|
||||
### Added
|
||||
- Jenkinsfile updated to publish in repo
|
||||
|
||||
---
|
||||
## [0.9.4] - 2025-03-17
|
||||
### Fixed
|
||||
- Mercure service behind nginx server for containers, expose port in docker compose for nginx
|
||||
|
||||
---
|
||||
## [0.9.3] - 2025-03-17
|
||||
### Fixed
|
||||
- Mercure service behind nginx server for containers
|
||||
|
||||
---
|
||||
## [0.9.2] - 2025-03-12
|
||||
### Fixed
|
||||
- Added mercure service in docker compose file for deployments.
|
||||
|
||||
---
|
||||
## [0.9.1] - 2025-03-12
|
||||
### Fixed
|
||||
- Corrección en la cancelacion de transmisiones p2p.
|
||||
|
||||
---
|
||||
## [0.9.0] - 2025-03-04
|
||||
### Added
|
||||
- Nueva funcionalidad para tener notificaciones en tiempo real. Instalación de bundle "Mercure".
|
||||
- Creacion de EventListener en Symfony, para publicar mensajes en Mercure, cuando se realicen cambios en la base de datos ( cambio de estado en lo equipos, y trazas).
|
||||
- Nuevo endpoint "backup image". Integracion con ogRepository.
|
||||
- Nuevo campo en "usuarios" el cual permite escoger la visualizacion por defecto de la vista "grupos".
|
||||
- Nuevo campo "dns" en "subredes" para gestionar los servidores DNS.
|
||||
- Integracion endpoint ogRepository para checkear la integridad de una imagen.
|
||||
- Nueva funcionalidad para cancelar despliegues de imagenes.
|
||||
- Añadido nuevo campo "cancelado" en trazas.
|
||||
|
||||
### Changed
|
||||
- Cambios en logs. Cambios en salida (stderror -> file.log)
|
||||
- Modulo DHCP. Añadir equipos, ahora se gestiona con una unica llamada a la API.
|
||||
- Acciones masivas en equipos. Se ha cambiado la respuesta para que no fallen las peticiones si uno o mas equipos no da respuesta.
|
||||
|
||||
---
|
||||
## [0.8.1] - 2025-02-25
|
||||
### Fixed
|
||||
- Corrección de bug en el deploy de imágenes
|
||||
|
||||
---
|
||||
|
||||
## [0.8.0] - 2025-01-10
|
||||
### Added
|
||||
- Nuevos campos en "aulas" para la jerarquia en clientes.
|
||||
- Nueva funcionalidad "imagen global". Integracion con ogRepository.
|
||||
|
||||
### Changed
|
||||
- Limpieza en campos "name" y "date" de ogLive. Es necesario parsear el campo "filename" para facilitar el uso al usuario en la web.
|
||||
### 🐛 Fixed
|
||||
- Corrección de bug que impedia borrar un cliente si tenia una traza enlazada.
|
||||
---
|
||||
|
||||
|
||||
## [0.7.3] - 2025-01-03
|
||||
### Added
|
||||
- Adaptados cambios en los endpoints para multiseleccion de clientes.
|
||||
- Se agregó la funcionalidad de importar/exportar. Integración con ogRepository.
|
||||
- Se agregó la funcionalidad de borrar imágenes. Integración con ogRepository.
|
||||
- Se agregó el modo "TORRENT" y "UDPCAST" en el despliegue de imágenes.
|
||||
|
||||
### ⚡ Changed
|
||||
- Refactorización del webhook de ogRepository.
|
||||
|
||||
---
|
||||
|
||||
## Formato de cambios:
|
||||
- **Added**: Secciones con nuevas características.
|
||||
- **Fixed**: Corrección de errores y bugs.
|
||||
- **Changed**: Modificaciones o mejoras en funcionalidades existentes.
|
||||
- **Improved**: Mejoras en funcionalidades existentes.
|
||||
- **Removed**: Funcionalidades o dependencias eliminadas.
|
|
@ -0,0 +1,107 @@
|
|||
@Library('jenkins-shared-library') _
|
||||
pipeline {
|
||||
agent {
|
||||
label 'jenkins-slave'
|
||||
}
|
||||
environment {
|
||||
DEBIAN_FRONTEND = 'noninteractive'
|
||||
DEFAULT_DEV_NAME = 'Opengnsys Team'
|
||||
DEFAULT_DEV_EMAIL = 'opengnsys@qindel.com'
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
parameters {
|
||||
string(name: 'DEV_NAME', defaultValue: '', description: 'Nombre del desarrollador')
|
||||
string(name: 'DEV_EMAIL', defaultValue: '', description: 'Email del desarrollador')
|
||||
}
|
||||
stages {
|
||||
stage('Prepare Workspace') {
|
||||
steps {
|
||||
script {
|
||||
env.BUILD_DIR = "${WORKSPACE}/ogcore"
|
||||
sh "mkdir -p ${env.BUILD_DIR}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
dir("${env.BUILD_DIR}") {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Generate Changelog') {
|
||||
when {
|
||||
expression {
|
||||
return env.TAG_NAME != null
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def devName = params.DEV_NAME ? params.DEV_NAME : env.DEFAULT_DEV_NAME
|
||||
def devEmail = params.DEV_EMAIL ? params.DEV_EMAIL : env.DEFAULT_DEV_EMAIL
|
||||
|
||||
generateDebianChangelog(env.BUILD_DIR, devName, devEmail)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Generate Changelog (Nightly)'){
|
||||
when {
|
||||
branch 'main'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def devName = params.DEV_NAME ? params.DEV_NAME : env.DEFAULT_DEV_NAME
|
||||
def devEmail = params.DEV_EMAIL ? params.DEV_EMAIL : env.DEFAULT_DEV_EMAIL
|
||||
generateDebianChangelog(env.BUILD_DIR, devName, devEmail,"nightly")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
script {
|
||||
construirPaquete(env.BUILD_DIR, "../artifacts", "172.17.8.68", "/var/tmp/opengnsys/debian-repo/ogcore")
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ('Publish to Debian Repository') {
|
||||
when {
|
||||
expression {
|
||||
return env.TAG_NAME != null
|
||||
}
|
||||
}
|
||||
agent { label 'debian-repo' }
|
||||
steps {
|
||||
script {
|
||||
// Construir el patrón de versión esperado en el nombre del paquete
|
||||
def versionPattern = "${env.TAG_NAME}-${env.BUILD_NUMBER}"
|
||||
publicarEnAptly('/var/tmp/opengnsys/debian-repo/ogcore', 'opengnsys-devel', versionPattern)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ('Publish to Debian Repository (Nightly)') {
|
||||
when {
|
||||
branch 'main'
|
||||
}
|
||||
agent { label 'debian-repo' }
|
||||
steps {
|
||||
script {
|
||||
// Construir el patrón de versión esperado en el nombre del paquete
|
||||
def versionPattern = "-${env.BUILD_NUMBER}~nightly"
|
||||
publicarEnAptly('/var/tmp/opengnsys/debian-repo/ogcore', 'nightly', versionPattern)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
notifyBuildStatus('narenas@qindel.com')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
pipeline {
|
||||
agent {
|
||||
label 'jenkins-slave'
|
||||
}
|
||||
|
||||
environment {
|
||||
DOCKER_REPO = "opengnsys"
|
||||
DOCKER_TAG = "${env.BUILD_NUMBER}"
|
||||
DOCKER_IMAGE_NAME = "ogcore"
|
||||
BRANCH_NAME = "${env.BRANCH_NAME}"
|
||||
DOCKER_IDENTITY = "${DOCKER_REPO}/${DOCKER_IMAGE_NAME}-php:${BRANCH_NAME}-${DOCKER_TAG}"
|
||||
DOCKER_IDENTITY_NGINX = "${DOCKER_REPO}/${DOCKER_IMAGE_NAME}-nginx:${BRANCH_NAME}-${DOCKER_TAG}"
|
||||
DOCKER_COMPOSE_TEMPLATE = 'docker-compose-ci-template.yaml'
|
||||
DOCKER_COMPOSE_FILE = 'docker-compose-ci-tmp.yaml'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage ("Checkout") {
|
||||
steps {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
stage('Build Environment') {
|
||||
steps {
|
||||
sh '''
|
||||
# Detener todos los contenedores si hay alguno ejecutándose
|
||||
if [ $(docker ps -q | wc -l) -gt 0 ]; then
|
||||
docker stop $(docker ps -q)
|
||||
fi
|
||||
|
||||
# Eliminar todos los contenedores si hay alguno detenido
|
||||
if [ $(docker ps -a -q | wc -l) -gt 0 ]; then
|
||||
docker rm $(docker ps -a -q)
|
||||
fi
|
||||
'''
|
||||
script {
|
||||
|
||||
docker.build("${DOCKER_IDENTITY}", '-f docker/Dockerfile-jenkins-php .')
|
||||
docker.build("${DOCKER_IDENTITY_NGINX}", '-f docker/Dockerfile-nginx .')
|
||||
}
|
||||
}
|
||||
}
|
||||
stage(('Prepare Docker Composer')) {
|
||||
steps {
|
||||
sh """
|
||||
sed 's|ogcore-php:static|${DOCKER_IDENTITY}|g; s|ogcore-nginx:static|${DOCKER_IDENTITY_NGINX}|g' ${DOCKER_COMPOSE_TEMPLATE} > ${DOCKER_COMPOSE_FILE}
|
||||
cat ${DOCKER_COMPOSE_FILE}
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('Run containers') {
|
||||
steps {
|
||||
sh "docker compose -f ${DOCKER_COMPOSE_FILE} up -d"
|
||||
}
|
||||
}
|
||||
stage('Install dependencies') {
|
||||
steps {
|
||||
// Install dependencies
|
||||
sh """
|
||||
docker compose exec php mkdir -p /report
|
||||
docker compose exec php composer install
|
||||
docker compose exec php php bin/console lexik:jwt:generate-keypair --overwrite
|
||||
docker compose exec php php bin/console doctrine:migrations:migrate --no-interaction
|
||||
docker compose exec php php bin/console doctrine:fixtures:load --no-interaction
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('Tests') {
|
||||
steps {
|
||||
// Run tests
|
||||
sh """
|
||||
docker compose exec php bin/phpunit --log-junit /report/phpunit.xml
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage ("Publish Image") {
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry('https://index.docker.io/v1/', 'docker-hub-credentials') {
|
||||
docker.image("${DOCKER_IDENTITY}").push()
|
||||
docker.image("${DOCKER_IDENTITY_NGINX}").push()
|
||||
if (env.BRANCH_NAME == 'main') {
|
||||
docker.image("${DOCKER_IDENTITY}").push("latest")
|
||||
docker.image("${DOCKER_IDENTITY_NGINX}").push("latest")
|
||||
}
|
||||
if (env.TAG_NAME) {
|
||||
docker.image("${DOCKER_IDENTITY}").push("${env.TAG_NAME}")
|
||||
docker.image("${DOCKER_IDENTITY_NGINX}").push("${env.TAG_NAME}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
def committerEmail = sh (
|
||||
script: "git show -s --pretty=%ae",
|
||||
returnStdout: true
|
||||
).trim()
|
||||
def buildResult = currentBuild.currentResult
|
||||
mail to: committerEmail,
|
||||
subject: "Opengnsys CI Build ${env.JOB_NAME} - ${env.BRANCH_NAME} - ${buildResult}",
|
||||
body: """
|
||||
<h1>Opengnsys CI Build ${JOB_NAME} - ${BRANCH_NAME} - ${buildResult}</h1>
|
||||
<p>Build Number: ${BUILD_NUMBER}</p>
|
||||
<p>Build URL: ${BUILD_URL}</p>º
|
||||
|
||||
Saludos cordiales,
|
||||
Opengnsys CI
|
||||
"""
|
||||
}
|
||||
sh "docker compose -f ${DOCKER_COMPOSE_FILE} cp php:/report/phpunit.xml phpunit.xml"
|
||||
// Publish JUnit test results
|
||||
xunit (
|
||||
thresholds: [ skipped(failureThreshold: '0') , failed(failureThreshold: '0') ],
|
||||
tools: [ PHPUnit(pattern: 'phpunit.xml') ]
|
||||
)
|
||||
// Remove containers
|
||||
sh "docker compose -f ${DOCKER_COMPOSE_FILE} down"
|
||||
sh "docker compose -f ${DOCKER_COMPOSE_FILE} rm -f"
|
||||
sh "docker rmi ${DOCKER_IDENTITY}"
|
||||
sh "docker rmi ${DOCKER_IDENTITY_NGINX}"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -69,6 +69,7 @@ docker exec ogcore-php php bin/console doctrine:migrations:migrate --no-interact
|
|||
```sh
|
||||
docker exec ogcore-php php bin/console doctrine:fixtures:load --no-interaction
|
||||
docker exec ogcore-php php bin/console app:load-default-user-groups #cargamos los grupos por defecto
|
||||
docker exec ogcore-php php bin/console app:load-default-commands #cargamos los commands por defecto
|
||||
```
|
||||
|
||||
## UX Api Platform
|
||||
|
@ -129,8 +130,11 @@ Una vez tengamos la base de datos cargada, podremos ejecutar las migraciones de
|
|||
```sh
|
||||
--- Migraciones de OpenGnsys. ---
|
||||
docker exec ogcore-php php bin/console opengnsys:migration:organizational-unit #cargamos las unidades organizativas
|
||||
docker exec ogcore-php php bin/console opengnsys:migrate-hardware-profiles #cargamos los perfiles de hardware
|
||||
docker exec ogcore-php php bin/console opengnsys:migration:hardware-profile #cargamos los perfiles de hardware
|
||||
docker exec ogcore-php php bin/console opengnsys:migration:clients #cargamos los clientes
|
||||
docker exec ogcore-php php bin/console opengnsys:migration:os #cargamos los sistemas operativos
|
||||
docker exec ogcore-php php bin/console opengnsys:migration:image #cargamos las imagenes
|
||||
docker exec ogcore-php php bin/console opengnsys:migration:software-profile #cargamos los software profiles
|
||||
```
|
||||
|
||||
## Objetos de interés
|
||||
|
|
|
@ -5,3 +5,9 @@ services:
|
|||
ports:
|
||||
- "5432"
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
###> symfony/mercure-bundle ###
|
||||
mercure:
|
||||
ports:
|
||||
- "80"
|
||||
###< symfony/mercure-bundle ###
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
"type": "project",
|
||||
"license": "proprietary",
|
||||
"minimum-stability": "stable",
|
||||
"version": "0.5.0",
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"ext-ctype": "*",
|
||||
"ext-iconv": "*",
|
||||
"api-platform/core": "^3.3",
|
||||
"api-platform/core": "^3.2",
|
||||
"doctrine/dbal": "^3",
|
||||
"doctrine/doctrine-bundle": "^2.12",
|
||||
"doctrine/doctrine-migrations-bundle": "^3.3",
|
||||
|
@ -25,11 +26,15 @@
|
|||
"symfony/expression-language": "6.4.*",
|
||||
"symfony/flex": "^2",
|
||||
"symfony/framework-bundle": "6.4.*",
|
||||
"symfony/http-client": "6.4.*",
|
||||
"symfony/mercure-bundle": "^0.3.9",
|
||||
"symfony/monolog-bundle": "^3.10",
|
||||
"symfony/property-access": "6.4.*",
|
||||
"symfony/property-info": "6.4.*",
|
||||
"symfony/runtime": "6.4.*",
|
||||
"symfony/security-bundle": "6.4.*",
|
||||
"symfony/serializer": "6.4.*",
|
||||
"symfony/translation": "6.4.*",
|
||||
"symfony/twig-bundle": "6.4.*",
|
||||
"symfony/validator": "6.4.*",
|
||||
"symfony/yaml": "6.4.*"
|
||||
|
@ -88,7 +93,6 @@
|
|||
"phpunit/phpunit": "^9.5",
|
||||
"symfony/browser-kit": "6.4.*",
|
||||
"symfony/css-selector": "6.4.*",
|
||||
"symfony/http-client": "6.4.*",
|
||||
"symfony/maker-bundle": "^1.59",
|
||||
"symfony/phpunit-bridge": "^7.0",
|
||||
"symfony/web-profiler-bundle": "^6.4",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -7,13 +7,15 @@ resources:
|
|||
groups: ['default', 'client:read']
|
||||
denormalizationContext:
|
||||
groups: ['client:write']
|
||||
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\ClientProvider
|
||||
filters:
|
||||
- 'api_platform.filter.client.order'
|
||||
- 'api_platform.filter.client.search'
|
||||
- 'api_platform.filter.client.boolean'
|
||||
- 'api_platform.filter.client.exist'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\ClientProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
|
@ -33,6 +35,43 @@ resources:
|
|||
uriTemplate: /clients/change-organizational-units
|
||||
controller: App\Controller\ChangeOrganizationalUnitAction
|
||||
|
||||
agent_status:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
output: false
|
||||
uriTemplate: /clients/{uuid}/agent/status
|
||||
controller: App\Controller\OgAgent\StatusAction
|
||||
|
||||
get_pxe:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /clients/server/{uuid}/get-pxe
|
||||
controller: App\Controller\OgBoot\PxeBootFile\GetAction
|
||||
|
||||
login_client:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\MultipleClientsInput
|
||||
uriTemplate: /clients/server/login-client
|
||||
controller: App\Controller\OgAgent\LoginAction
|
||||
|
||||
reboot_client:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\MultipleClientsInput
|
||||
uriTemplate: /clients/server/reboot
|
||||
controller: App\Controller\OgAgent\RebootAction
|
||||
|
||||
power_off_client:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\MultipleClientsInput
|
||||
uriTemplate: /clients/server/power-off
|
||||
controller: App\Controller\OgAgent\PowerOffAction
|
||||
|
||||
|
||||
properties:
|
||||
App\Entity\Client:
|
||||
id:
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
resources:
|
||||
App\Entity\Command:
|
||||
processor: App\State\Processor\CommandProcessor
|
||||
input: App\Dto\Input\CommandInput
|
||||
output: App\Dto\Output\CommandOutput
|
||||
normalizationContext:
|
||||
groups: ['default', 'command:read']
|
||||
denormalizationContext:
|
||||
groups: ['command:write']
|
||||
order:
|
||||
id: 'DESC'
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\CommandProvider
|
||||
filters:
|
||||
- 'api_platform.filter.command.order'
|
||||
- 'api_platform.filter.command.search'
|
||||
- 'api_platform.filter.command.boolean'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\CommandProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
provider: App\State\Provider\CommandProvider
|
||||
ApiPlatform\Metadata\Patch:
|
||||
provider: App\State\Provider\CommandProvider
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
command_execute:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\CommandExecuteInput
|
||||
uriTemplate: /commands/run-script
|
||||
controller: App\Controller\OgAgent\RunScriptAction
|
||||
properties:
|
||||
App\Entity\Command:
|
||||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
|
@ -0,0 +1,46 @@
|
|||
resources:
|
||||
App\Entity\CommandGroup:
|
||||
processor: App\State\Processor\CommandGroupProcessor
|
||||
input: App\Dto\Input\CommandGroupInput
|
||||
output: App\Dto\Output\CommandGroupOutput
|
||||
normalizationContext:
|
||||
groups: ['default', 'command-group:read']
|
||||
denormalizationContext:
|
||||
groups: ['command-group:write']
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\CommandGroupProvider
|
||||
filters:
|
||||
- 'api_platform.filter.command.order'
|
||||
- 'api_platform.filter.command.search'
|
||||
- 'api_platform.filter.command.boolean'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\CommandGroupProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
provider: App\State\Provider\CommandGroupProvider
|
||||
ApiPlatform\Metadata\Patch:
|
||||
provider: App\State\Provider\CommandGroupProvider
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
add_commands:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\CommandGroupAddCommandsInput
|
||||
uriTemplate: /command-groups/{uuid}/add-commands
|
||||
controller: App\Controller\CommandGroupAddCommandsAction
|
||||
|
||||
command_group_execute:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\CommandGroupExecuteInput
|
||||
uriTemplate: /command-groups/{uuid}/execute
|
||||
controller: App\Controller\CommandGroupExecuteAction
|
||||
|
||||
properties:
|
||||
App\Entity\CommandGroup:
|
||||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
|
@ -0,0 +1,32 @@
|
|||
resources:
|
||||
App\Entity\CommandTask:
|
||||
processor: App\State\Processor\CommandTaskProcessor
|
||||
input: App\Dto\Input\CommandTaskInput
|
||||
output: App\Dto\Output\CommandTaskOutput
|
||||
normalizationContext:
|
||||
groups: ['default', 'command-task:read']
|
||||
denormalizationContext:
|
||||
groups: ['command-task:write']
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\CommandTaskProvider
|
||||
filters:
|
||||
- 'api_platform.filter.command_task.order'
|
||||
- 'api_platform.filter.command_task.search'
|
||||
- 'api_platform.filter.command_task.boolean'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\CommandTaskProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
provider: App\State\Provider\CommandTaskProvider
|
||||
ApiPlatform\Metadata\Patch:
|
||||
provider: App\State\Provider\CommandTaskProvider
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
properties:
|
||||
App\Entity\CommandTask:
|
||||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
|
@ -7,12 +7,17 @@ resources:
|
|||
groups: ['default', 'image:read']
|
||||
denormalizationContext:
|
||||
groups: ['image:write']
|
||||
order:
|
||||
id: 'DESC'
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\ImageProvider
|
||||
filters:
|
||||
- 'api_platform.filter.image.order'
|
||||
- 'api_platform.filter.image.search'
|
||||
- 'api_platform.filter.image.boolean'
|
||||
- 'image.repository_filter'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\ImageProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
resources:
|
||||
App\Entity\ImageImageRepository:
|
||||
processor: App\State\Processor\ImageImageRepositoryProcessor
|
||||
input: App\Dto\Input\ImageImageRepositoryInput
|
||||
output: App\Dto\Output\ImageImageRepositoryOutput
|
||||
normalizationContext:
|
||||
groups: ['default', 'image-image-repository:read']
|
||||
denormalizationContext:
|
||||
groups: ['image-image-repository:write']
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\ImageImageRepositoryProvider
|
||||
filters:
|
||||
- 'api_platform.filter.image_image_repository.order'
|
||||
- 'api_platform.filter.image_image_repository.search'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\ImageImageRepositoryProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
provider: App\State\Provider\ImageImageRepositoryProvider
|
||||
ApiPlatform\Metadata\Patch:
|
||||
provider: App\State\Provider\ImageImageRepositoryProvider
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
get_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
description: Get image in OgRepository
|
||||
class: ApiPlatform\Metadata\Get
|
||||
method: GET
|
||||
input: false
|
||||
uriTemplate: /image-image-repositories/server/{uuid}/get
|
||||
controller: App\Controller\OgRepository\Image\GetAction
|
||||
|
||||
create_aux_files_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /image-image-repositories/server/{uuid}/create-aux-files
|
||||
controller: App\Controller\OgRepository\Image\CreateAuxFilesAction
|
||||
|
||||
deploy_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\DeployImageInput
|
||||
uriTemplate: /image-image-repositories/{uuid}/deploy-image
|
||||
controller: App\Controller\DeployImageAction
|
||||
|
||||
backup_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\BackupImageInput
|
||||
uriTemplate: /image-image-repositories/{uuid}/backup-image
|
||||
controller: App\Controller\OgRepository\Image\BackupImageAction
|
||||
|
||||
convert_image_to_virtual_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\ConvertImageToVirtualInput
|
||||
uriTemplate: /image-image-repositories/{uuid}/convert-image-to-virtual
|
||||
controller: App\Controller\OgRepository\Image\ConvertImageToVirtualAction
|
||||
|
||||
rename_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\RenameImageInput
|
||||
uriTemplate: /image-image-repositories/{uuid}/rename-image
|
||||
controller: App\Controller\OgRepository\Image\RenameAction
|
||||
|
||||
trash_delete_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
description: Delete Image in OgRepository
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /image-image-repositories/server/{uuid}/delete-trash
|
||||
controller: App\Controller\OgRepository\Image\DeleteTrashAction
|
||||
|
||||
permanent_delete_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
description: Delete Image in OgRepository
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /image-image-repositories/server/{uuid}/delete-permanent
|
||||
controller: App\Controller\OgRepository\Image\DeletePermanentAction
|
||||
|
||||
recover_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
description: Recover Image in OgRepository
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /image-image-repositories/server/{uuid}/recover
|
||||
controller: App\Controller\OgRepository\Image\RecoverAction
|
||||
|
||||
transfer_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
description: Export Image in OgRepository
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\TransferGlobalImageInput
|
||||
uriTemplate: /image-image-repositories/{uuid}/transfer-image
|
||||
controller: App\Controller\OgRepository\Image\TransferAction
|
||||
|
||||
get_status_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
description: Get Status Image in OgRepository
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /image-image-repositories/server/{uuid}/status
|
||||
controller: App\Controller\OgRepository\Image\GetStatusAction
|
||||
|
||||
transfer_global_image_repository:
|
||||
shortName: OgRepository Server
|
||||
description: Transfer Global Image in OgRepository
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /image-image-repositories/server/{uuid}/transfer-global
|
||||
controller: App\Controller\OgRepository\Image\TransferGlobalAction
|
||||
|
||||
properties:
|
||||
App\Entity\ImageImageRepository:
|
||||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
|
@ -0,0 +1,83 @@
|
|||
resources:
|
||||
App\Entity\ImageRepository:
|
||||
processor: App\State\Processor\ImageRepositoryProcessor
|
||||
input: App\Dto\Input\ImageRepositoryInput
|
||||
output: App\Dto\Output\ImageRepositoryOutput
|
||||
normalizationContext:
|
||||
groups: ['default', 'repository:read']
|
||||
denormalizationContext:
|
||||
groups: ['repository:write']
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\ImageRepositoryProvider
|
||||
filters:
|
||||
- 'api_platform.filter.repository.order'
|
||||
- 'api_platform.filter.repository.search'
|
||||
- 'repository.not_equal_filter'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\ImageRepositoryProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
provider: App\State\Provider\ImageRepositoryProvider
|
||||
ApiPlatform\Metadata\Patch:
|
||||
provider: App\State\Provider\ImageRepositoryProvider
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
image_ogrepository_sync:
|
||||
shortName: OgRepository Server
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /image-repositories/server/{uuid}/sync
|
||||
controller: App\Controller\OgRepository\SyncAction
|
||||
|
||||
wol_client:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\WoLInput
|
||||
uriTemplate: /image-repositories/wol
|
||||
controller: App\Controller\OgRepository\WoLAction
|
||||
|
||||
get_collection_images_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
description: Get collection of image in OgRepository
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /image-repositories/server/{uuid}/get-collection
|
||||
controller: App\Controller\OgRepository\GetCollectionAction
|
||||
|
||||
images_ogrepository_status:
|
||||
shortName: OgRepository Server
|
||||
description: Get status of OgRepository
|
||||
class: ApiPlatform\Metadata\Get
|
||||
method: GET
|
||||
input: false
|
||||
uriTemplate: /image-repositories/server/{uuid}/status
|
||||
controller: App\Controller\OgRepository\StatusAction
|
||||
|
||||
import_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
description: Export Image in OgRepository
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\ImportImageRepositoryInput
|
||||
uriTemplate: /image-repositories/{uuid}/import-image
|
||||
controller: App\Controller\OgRepository\Image\ImportAction
|
||||
|
||||
convert_image_ogrepository:
|
||||
shortName: OgRepository Server
|
||||
description: Convert Image in OgRepository
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\ConvertImageRepositoryInput
|
||||
uriTemplate: /image-repositories/{uuid}/convert-image
|
||||
controller: App\Controller\OgRepository\Image\ConvertAction
|
||||
|
||||
properties:
|
||||
App\Entity\ImageRepository:
|
||||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
|
@ -0,0 +1,102 @@
|
|||
resources:
|
||||
App\Entity\OgLive:
|
||||
processor: App\State\Processor\OgLiveProcessor
|
||||
input: App\Dto\Input\OgLiveInput
|
||||
output: App\Dto\Output\OgLiveOutput
|
||||
normalizationContext:
|
||||
groups: ['default', 'og-live:read']
|
||||
denormalizationContext:
|
||||
groups: ['og-live:write']
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\OgLiveProvider
|
||||
filters:
|
||||
- 'api_platform.filter.og_live.order'
|
||||
- 'api_platform.filter.og_live.search'
|
||||
- 'api_platform.filter.og_live.boolean'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\OgLiveProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
provider: App\State\Provider\OgLiveProvider
|
||||
ApiPlatform\Metadata\Patch:
|
||||
provider: App\State\Provider\OgLiveProvider
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
oglives_sync:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /og-lives/sync
|
||||
controller: App\Controller\OgBoot\OgLive\SyncAction
|
||||
|
||||
get_collection_oglives:
|
||||
shortName: OgLive Server
|
||||
description: Get collection of OgLive
|
||||
class: ApiPlatform\Metadata\GetCollection
|
||||
method: GET
|
||||
input: false
|
||||
uriTemplate: /og-lives/server/get-collection
|
||||
controller: App\Controller\OgBoot\OgLive\GetCollectionAction
|
||||
|
||||
get_oglive:
|
||||
shortName: OgLive Server
|
||||
description: Get OgLive
|
||||
class: ApiPlatform\Metadata\Get
|
||||
method: GET
|
||||
input: false
|
||||
uriTemplate: /og-lives/server/{uuid}/get
|
||||
controller: App\Controller\OgBoot\OgLive\GetAction
|
||||
|
||||
get_isos:
|
||||
shortName: OgLive Server
|
||||
description: Get Isos of OgLive
|
||||
class: ApiPlatform\Metadata\GetCollection
|
||||
method: GET
|
||||
input: false
|
||||
uriTemplate: /og-lives/server/get-isos
|
||||
controller: App\Controller\OgBoot\OgLive\GetIsosAction
|
||||
|
||||
get_default:
|
||||
shortName: OgLive Server
|
||||
description: Get default OgLive
|
||||
class: ApiPlatform\Metadata\GetCollection
|
||||
method: GET
|
||||
input: false
|
||||
uriTemplate: /og-lives/server/get-default
|
||||
controller: App\Controller\OgBoot\OgLive\GetDefaultAction
|
||||
|
||||
set_default:
|
||||
shortName: OgLive Server
|
||||
description: Set default OgLive
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /og-lives/server/{uuid}/set-default
|
||||
controller: App\Controller\OgBoot\OgLive\SetDefaultAction
|
||||
|
||||
install:
|
||||
shortName: OgLive Server
|
||||
description: Install OgLive
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /og-lives/server/{uuid}/install
|
||||
controller: App\Controller\OgBoot\OgLive\InstallAction
|
||||
|
||||
uninstall:
|
||||
shortName: OgLive Server
|
||||
description: Uninstall OgLive
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /og-lives/server/{uuid}/uninstall
|
||||
controller: App\Controller\OgBoot\OgLive\UninstallAction
|
||||
|
||||
properties:
|
||||
App\Entity\OgLive:
|
||||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
|
@ -13,6 +13,8 @@ resources:
|
|||
filters:
|
||||
- 'api_platform.filter.organizational_unit.order'
|
||||
- 'api_platform.filter.organizational_unit.search'
|
||||
- 'api_platform.filter.organizational_unit.group_filter'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
security: 'is_granted("ORGANIZATIONAL_UNIT_VIEW", object)'
|
||||
provider: App\State\Provider\OrganizationalUnitProvider
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
resources:
|
||||
App\Entity\Partition:
|
||||
processor: App\State\Processor\PartitionProcessor
|
||||
input: App\Dto\Input\PartitionInput
|
||||
input: App\Dto\Input\PartitionPostInput
|
||||
output: App\Dto\Output\PartitionOutput
|
||||
order:
|
||||
partitionNumber: 'ASC'
|
||||
normalizationContext:
|
||||
groups: ['default', 'partition:read']
|
||||
denormalizationContext:
|
||||
|
@ -27,4 +29,4 @@ properties:
|
|||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
||||
identifier: true
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
resources:
|
||||
App\Entity\PxeTemplate:
|
||||
processor: App\State\Processor\PxeTemplateProcessor
|
||||
input: App\Dto\Input\PxeTemplateInput
|
||||
output: App\Dto\Output\PxeTemplateOutput
|
||||
normalizationContext:
|
||||
groups: ['default', 'pxe-template:read']
|
||||
denormalizationContext:
|
||||
groups: ['pxe-template:write']
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\PxeTemplateProvider
|
||||
filters:
|
||||
- 'api_platform.filter.pxe_template.order'
|
||||
- 'api_platform.filter.pxe_template.search'
|
||||
- 'api_platform.filter.pxe_template.boolean'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\PxeTemplateProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
provider: App\State\Provider\PxeTemplateProvider
|
||||
ApiPlatform\Metadata\Patch:
|
||||
provider: App\State\Provider\PxeTemplateProvider
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
pxe_template_sync:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /pxe-templates/sync
|
||||
controller: App\Controller\OgBoot\PxeTemplate\SyncAction
|
||||
|
||||
get_collection_templates:
|
||||
shortName: PxeTemplate Server
|
||||
description: Get collection of PxeTemplate
|
||||
class: ApiPlatform\Metadata\GetCollection
|
||||
method: GET
|
||||
input: false
|
||||
uriTemplate: /pxe-templates/server/get-collection
|
||||
controller: App\Controller\OgBoot\PxeTemplate\GetCollectionAction
|
||||
|
||||
get_template:
|
||||
shortName: PxeTemplate Server
|
||||
description: Get PxeTemplate
|
||||
class: ApiPlatform\Metadata\Get
|
||||
method: GET
|
||||
input: false
|
||||
uriTemplate: /pxe-templates/server/{uuid}/get
|
||||
controller: App\Controller\OgBoot\PxeTemplate\GetAction
|
||||
|
||||
post_template:
|
||||
shortName: PxeTemplate Server
|
||||
description: Create PxeTemplate
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /pxe-templates/server/{uuid}/post
|
||||
controller: App\Controller\OgBoot\PxeTemplate\PostAction
|
||||
|
||||
delete_template:
|
||||
shortName: PxeTemplate Server
|
||||
description: Delete PxeTemplate
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /pxe-templates/server/{uuid}/delete
|
||||
controller: App\Controller\OgBoot\PxeTemplate\DeleteAction
|
||||
|
||||
template_add_clients:
|
||||
shortName: PxeTemplate Server
|
||||
description: Add Client to PxeTemplate
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\PxeTemplateAddClientsInput
|
||||
uriTemplate: /pxe-templates/{uuid}/add-clients
|
||||
controller: App\Controller\OgBoot\PxeTemplate\AddClientAction
|
||||
|
||||
template_sync_client:
|
||||
shortName: PxeTemplate Server
|
||||
description: Sync Client to PxeTemplate
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\PxeTemplateSyncClientInput
|
||||
uriTemplate: /pxe-templates/{uuid}/sync-client
|
||||
controller: App\Controller\OgBoot\PxeBootFile\PostAction
|
||||
|
||||
template_delete_client:
|
||||
shortName: PxeTemplate Server
|
||||
description: Add Client to PxeTemplate
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\PxeTemplateDeleteClientInput
|
||||
uriTemplate: /pxe-templates/{uuid}/delete-client
|
||||
controller: App\Controller\OgBoot\PxeTemplate\DeleteClientAction
|
||||
|
||||
|
||||
properties:
|
||||
App\Entity\PxeTemplate:
|
||||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
|
@ -0,0 +1,37 @@
|
|||
resources:
|
||||
App\Entity\RemoteCalendar:
|
||||
processor: App\State\Processor\RemoteCalendarProcessor
|
||||
input: App\Dto\Input\RemoteCalendarInput
|
||||
output: App\Dto\Output\RemoteCalendarOutput
|
||||
normalizationContext:
|
||||
groups: ['default', 'remote-calendar:read']
|
||||
denormalizationContext:
|
||||
groups: ['remote-calendar:write']
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\RemoteCalendarProvider
|
||||
filters:
|
||||
- 'api_platform.filter.remote_calendar.order'
|
||||
- 'api_platform.filter.remote_calendar.search'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\RemoteCalendarProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
provider: App\State\Provider\RemoteCalendarProvider
|
||||
ApiPlatform\Metadata\Patch:
|
||||
provider: App\State\Provider\RemoteCalendarProvider
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
sync_uds:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
uriTemplate: /remote-calendars/{uuid}/sync-uds
|
||||
controller: App\Controller\UDS\RemoteCalendarSyncUdsAction
|
||||
|
||||
properties:
|
||||
App\Entity\RemoteCalendar:
|
||||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
|
@ -0,0 +1,31 @@
|
|||
resources:
|
||||
App\Entity\RemoteCalendarRule:
|
||||
processor: App\State\Processor\RemoteCalendarRuleProcessor
|
||||
input: App\Dto\Input\RemoteCalendarRuleInput
|
||||
output: App\Dto\Output\RemoteCalendarRuleOutput
|
||||
normalizationContext:
|
||||
groups: ['default', 'remote-calendar-rule:read']
|
||||
denormalizationContext:
|
||||
groups: ['remote-calendar-rule:write']
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\RemoteCalendarRuleProvider
|
||||
filters:
|
||||
- 'api_platform.filter.remote_calendar_rule.order'
|
||||
- 'api_platform.filter.remote_calendar_rule.search'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\RemoteCalendarRuleProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
provider: App\State\Provider\RemoteCalendarRuleProvider
|
||||
ApiPlatform\Metadata\Patch:
|
||||
provider: App\State\Provider\RemoteCalendarRuleProvider
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
properties:
|
||||
App\Entity\RemoteCalendarRule:
|
||||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
|
@ -11,10 +11,13 @@ resources:
|
|||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\SoftwareProfileProvider
|
||||
filters:
|
||||
- 'api_platform.filter.software.order'
|
||||
- 'api_platform.filter.software.search'
|
||||
- 'api_platform.filter.software_profile.order'
|
||||
- 'api_platform.filter.software_profile.search'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\SoftwareProfileProvider
|
||||
normalizationContext:
|
||||
groups: ['software-profile:read', 'software-profile:item:get', 'software-profile:read:collection:short']
|
||||
ApiPlatform\Metadata\Put:
|
||||
provider: App\State\Provider\SoftwareProfileProvider
|
||||
ApiPlatform\Metadata\Patch:
|
||||
|
|
|
@ -0,0 +1,121 @@
|
|||
resources:
|
||||
App\Entity\Subnet:
|
||||
processor: App\State\Processor\SubnetProcessor
|
||||
input: App\Dto\Input\SubnetInput
|
||||
output: App\Dto\Output\SubnetOutput
|
||||
normalizationContext:
|
||||
groups: ['default', 'subnet:read']
|
||||
denormalizationContext:
|
||||
groups: ['subnet:write']
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\SubnetProvider
|
||||
filters:
|
||||
- 'api_platform.filter.subnet.order'
|
||||
- 'api_platform.filter.subnet.search'
|
||||
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\SubnetProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
provider: App\State\Provider\SubnetProvider
|
||||
ApiPlatform\Metadata\Patch:
|
||||
provider: App\State\Provider\SubnetProvider
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
subnet_sync:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /subnets/sync
|
||||
controller: App\Controller\OgDhcp\Subnet\SyncAction
|
||||
|
||||
get_collection_subnets:
|
||||
shortName: Subnet Server
|
||||
description: Get collection of Subnet
|
||||
class: ApiPlatform\Metadata\GetCollection
|
||||
method: GET
|
||||
input: false
|
||||
uriTemplate: /og-dhcp/server/get-collection
|
||||
controller: App\Controller\OgDhcp\Subnet\GetCollectionAction
|
||||
|
||||
get_subnet:
|
||||
shortName: Subnet Server
|
||||
description: Get Subnet
|
||||
class: ApiPlatform\Metadata\Get
|
||||
method: GET
|
||||
input: false
|
||||
uriTemplate: /og-dhcp/server/{uuid}/get
|
||||
controller: App\Controller\OgDhcp\Subnet\GetAction
|
||||
|
||||
post_subnet:
|
||||
shortName: Subnet Server
|
||||
description: Create Subnet
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /og-dhcp/server/{uuid}/post
|
||||
controller: App\Controller\OgDhcp\Subnet\PostAction
|
||||
|
||||
put_subnet:
|
||||
shortName: Subnet Server
|
||||
description: Create Subnet
|
||||
class: ApiPlatform\Metadata\Put
|
||||
method: PUT
|
||||
input: false
|
||||
uriTemplate: /og-dhcp/server/{uuid}/put
|
||||
controller: App\Controller\OgDhcp\Subnet\PutAction
|
||||
|
||||
delete_subnet:
|
||||
shortName: Subnet Server
|
||||
description: Delete Subnet
|
||||
class: ApiPlatform\Metadata\Delete
|
||||
method: DELETE
|
||||
input: false
|
||||
uriTemplate: /og-dhcp/server/{uuid}/delete
|
||||
controller: App\Controller\OgDhcp\Subnet\DeleteAction
|
||||
|
||||
post_host:
|
||||
shortName: Subnet Server Hosts
|
||||
description: Post Host to Subnet
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: App\Dto\Input\SubnetAddHostInput
|
||||
uriTemplate: /og-dhcp/server/{uuid}/post-host
|
||||
controller: App\Controller\OgDhcp\Subnet\PostHostAction
|
||||
|
||||
get_hosts:
|
||||
shortName: Subnet Server Hosts
|
||||
description: Get Hosts of Subnet
|
||||
class: ApiPlatform\Metadata\Get
|
||||
method: GET
|
||||
input: false
|
||||
uriTemplate: /og-dhcp/server/{uuid}/get-hosts
|
||||
controller: App\Controller\OgDhcp\Subnet\GetHostsAction
|
||||
|
||||
put_host:
|
||||
shortName: Subnet Server Hosts
|
||||
description: Put Host of Subnet
|
||||
class: ApiPlatform\Metadata\Put
|
||||
method: PUT
|
||||
input: false
|
||||
uriTemplate: /og-dhcp/server/{uuid}/put-host
|
||||
controller: App\Controller\OgDhcp\Subnet\PutHostAction
|
||||
|
||||
delete_host:
|
||||
shortName: Subnet Server Hosts
|
||||
description: Delete Host of Subnet
|
||||
class: ApiPlatform\Metadata\Delete
|
||||
method: DELETE
|
||||
input: false
|
||||
read: false
|
||||
uriTemplate: /og-dhcp/server/{uuid}/delete-host/{clientUuid}
|
||||
controller: App\Controller\OgDhcp\Subnet\DeleteHostAction
|
||||
|
||||
|
||||
properties:
|
||||
App\Entity\Subnet:
|
||||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
|
@ -0,0 +1,32 @@
|
|||
resources:
|
||||
App\Entity\Trace:
|
||||
output: App\Dto\Output\TraceOutput
|
||||
normalizationContext:
|
||||
groups: ['default', 'trace:read']
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\TraceProvider
|
||||
filters:
|
||||
- 'api_platform.filter.trace.order'
|
||||
- 'api_platform.filter.trace.search'
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\TraceProvider
|
||||
|
||||
cancel_trace:
|
||||
shortName: OgRepository Server
|
||||
description: Cancel Trace in OgRepository
|
||||
class: ApiPlatform\Metadata\Post
|
||||
method: POST
|
||||
input: false
|
||||
uriTemplate: /traces/server/{uuid}/cancel
|
||||
controller: App\Controller\OgRepository\Image\CancelTransmissionAction
|
||||
|
||||
order:
|
||||
createdAt: DESC
|
||||
|
||||
properties:
|
||||
App\Entity\Trace:
|
||||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
|
@ -0,0 +1,30 @@
|
|||
resources:
|
||||
App\Entity\View:
|
||||
processor: App\State\Processor\ViewProcessor
|
||||
input: App\Dto\Input\ViewInput
|
||||
output: App\Dto\Output\ViewOutput
|
||||
normalizationContext:
|
||||
groups: ['default', 'view:read']
|
||||
denormalizationContext:
|
||||
groups: ['view:write']
|
||||
operations:
|
||||
ApiPlatform\Metadata\GetCollection:
|
||||
provider: App\State\Provider\ViewProvider
|
||||
filters:
|
||||
- 'api_platform.filter.view.order'
|
||||
- 'api_platform.filter.view.search'
|
||||
ApiPlatform\Metadata\Get:
|
||||
provider: App\State\Provider\ViewProvider
|
||||
ApiPlatform\Metadata\Put:
|
||||
provider: App\State\Provider\ViewProvider
|
||||
ApiPlatform\Metadata\Patch:
|
||||
provider: App\State\Provider\ViewProvider
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
properties:
|
||||
App\Entity\View:
|
||||
id:
|
||||
identifier: false
|
||||
uuid:
|
||||
identifier: true
|
|
@ -16,4 +16,6 @@ return [
|
|||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
|
||||
DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true],
|
||||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
|
||||
];
|
||||
|
|
|
@ -1,43 +1,29 @@
|
|||
api_platform:
|
||||
title: 'OgCore API'
|
||||
description: 'API Documentation for OgCore'
|
||||
version: 1.0.0
|
||||
path_segment_name_generator: 'api_platform.path_segment_name_generator.dash'
|
||||
title: 'OgCore Api'
|
||||
description: 'Api Documentation for OgCore'
|
||||
version: 0.5.0
|
||||
path_segment_name_generator: api_platform.path_segment_name_generator.dash
|
||||
defaults:
|
||||
pagination_client_items_per_page: true
|
||||
mercure:
|
||||
enabled: true
|
||||
|
||||
collection:
|
||||
pagination:
|
||||
items_per_page_parameter_name: 'itemsPerPage'
|
||||
formats:
|
||||
jsonld: [ 'application/ld+json' ]
|
||||
jsonhal: [ 'application/hal+json' ]
|
||||
jsonapi: [ 'application/vnd.api+json' ]
|
||||
json: [ 'application/json' ]
|
||||
xml: [ 'application/xml', 'text/xml' ]
|
||||
yaml: [ 'application/x-yaml' ]
|
||||
csv: [ 'text/csv' ]
|
||||
html: [ 'text/html' ]
|
||||
json: [ 'application/json' ]
|
||||
csv: [ 'text/csv' ]
|
||||
patch_formats:
|
||||
jsonld: ['application/ld+json', 'application/json']
|
||||
mapping:
|
||||
paths: ['%kernel.project_dir%/config/api_platform', '%kernel.project_dir%/src/Dto']
|
||||
use_symfony_listeners: true
|
||||
collection:
|
||||
pagination:
|
||||
items_per_page_parameter_name: 'itemsPerPage'
|
||||
defaults:
|
||||
pagination_client_items_per_page: true
|
||||
denormalization_context:
|
||||
allow_extra_attributes: false
|
||||
cache_headers:
|
||||
vary: [ 'Content-Type', 'Authorization', 'Origin' ]
|
||||
extra_properties:
|
||||
standard_put: true
|
||||
rfc_7807_compliant_errors: true
|
||||
event_listeners_backward_compatibility_layer: false
|
||||
keep_legacy_inflector: true
|
||||
docs_formats:
|
||||
jsonld: ['application/ld+json']
|
||||
jsonopenapi: ['application/vnd.openapi+json']
|
||||
html: ['text/html']
|
||||
swagger:
|
||||
versions: [3]
|
||||
api_keys:
|
||||
apiKey:
|
||||
name: Authorization
|
||||
type: header
|
||||
type: header
|
||||
exception_to_status:
|
||||
Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException: 409
|
|
@ -12,12 +12,18 @@ framework:
|
|||
handler_id: null
|
||||
cookie_secure: auto
|
||||
cookie_samesite: lax
|
||||
storage_factory_id: session.storage.factory.native
|
||||
|
||||
#esi: true
|
||||
#fragments: true
|
||||
php_errors:
|
||||
log: true
|
||||
|
||||
http_client:
|
||||
default_options:
|
||||
verify_host: false
|
||||
verify_peer: false
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
test: true
|
||||
|
|
|
@ -2,6 +2,7 @@ lexik_jwt_authentication:
|
|||
secret_key: '%env(resolve:JWT_SECRET_KEY)%'
|
||||
public_key: '%env(resolve:JWT_PUBLIC_KEY)%'
|
||||
pass_phrase: '%env(JWT_PASSPHRASE)%'
|
||||
token_ttl: 86400 # 1 day
|
||||
api_platform:
|
||||
check_path: /auth/login
|
||||
username_path: username
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
mercure:
|
||||
hubs:
|
||||
default:
|
||||
url: '%env(MERCURE_URL)%'
|
||||
public_url: '%env(MERCURE_PUBLIC_URL)%'
|
||||
jwt:
|
||||
secret: '%env(MERCURE_JWT_SECRET)%'
|
||||
publish: '*'
|
|
@ -0,0 +1,62 @@
|
|||
monolog:
|
||||
channels:
|
||||
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
|
||||
|
||||
when@dev:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: stream
|
||||
level: info
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
formatter: App\Formatter\CustomLineFormatter
|
||||
channels: ["!event"]
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: ["!event", "!doctrine", "!console"]
|
||||
syslog:
|
||||
type: syslog
|
||||
ident: "ogcore"
|
||||
level: info
|
||||
formatter: App\Formatter\CustomLineFormatter
|
||||
channels: ["!event"]
|
||||
|
||||
when@test:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: error
|
||||
|
||||
nested:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
|
||||
when@prod:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: error
|
||||
formatter: App\Formatter\CustomLineFormatter
|
||||
channels: ["!event"]
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: ["!event", "!doctrine"]
|
||||
syslog:
|
||||
type: syslog
|
||||
ident: "ogcore"
|
||||
level: info
|
||||
formatter: App\Formatter\CustomLineFormatter
|
||||
channels: ["!event"]
|
||||
deprecation:
|
||||
type: stream
|
||||
channels: [deprecation]
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
formatter: monolog.formatter.json
|
||||
|
|
@ -11,7 +11,7 @@ security:
|
|||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
security: false
|
||||
main:
|
||||
stateless: true
|
||||
stateless: false
|
||||
provider: app_user_provider
|
||||
entry_point: jwt
|
||||
json_login:
|
||||
|
@ -29,7 +29,12 @@ security:
|
|||
- { path: ^/$, roles: PUBLIC_ACCESS } # Allows accessing the Swagger UI
|
||||
- { path: ^/docs, roles: PUBLIC_ACCESS } # Allows accessing the Swagger UI docs
|
||||
- { path: ^/auth/login, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/opengnsys/rest, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/og-repository/webhook, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/og-lives/install/webhook, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/auth/refresh, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/menu-browser, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/menu/, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/, roles: IS_AUTHENTICATED_FULLY }
|
||||
|
||||
when@test:
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
framework:
|
||||
default_locale: es
|
||||
translator:
|
||||
default_path: '%kernel.project_dir%/translations'
|
||||
fallbacks:
|
||||
- en
|
||||
- es
|
||||
providers:
|
|
@ -14,4 +14,4 @@ when@test:
|
|||
intercept_redirects: false
|
||||
|
||||
framework:
|
||||
profiler: { collect: false }
|
||||
profiler: { collect: false }
|
|
@ -4,7 +4,9 @@ imports:
|
|||
parameters:
|
||||
|
||||
services:
|
||||
# default configuration for services in *this* file
|
||||
App\DependencyInjection\JsonEnvVarLoader:
|
||||
tags: ['container.env_var_loader']
|
||||
|
||||
_defaults:
|
||||
autowire: true # Automatically injects dependencies in your services.
|
||||
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
|
||||
|
@ -12,7 +14,6 @@ services:
|
|||
App\:
|
||||
resource: '../src/'
|
||||
exclude:
|
||||
- '../src/DependencyInjection/'
|
||||
- '../src/Entity/'
|
||||
- '../src/Kernel.php'
|
||||
|
||||
|
@ -21,6 +22,12 @@ services:
|
|||
- { name: api_platform.doctrine.orm.query_extension.collection }
|
||||
- { name: api_platform.doctrine.orm.query_extension.item }
|
||||
|
||||
App\EventListener\LocaleSubscriber:
|
||||
arguments:
|
||||
$defaultLocale: '%kernel.default_locale%'
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
App\OpenApi\OpenApiFactory:
|
||||
decorates: 'api_platform.openapi.factory'
|
||||
arguments: [ '@App\OpenApi\OpenApiFactory.inner' ]
|
||||
|
@ -90,3 +97,62 @@ services:
|
|||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
|
||||
App\State\Provider\ViewProvider:
|
||||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
|
||||
App\State\Provider\OgLiveProvider:
|
||||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
|
||||
App\State\Provider\RemoteCalendarProvider:
|
||||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
|
||||
App\State\Provider\CommandProvider:
|
||||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
|
||||
App\State\Provider\PxeTemplateProvider:
|
||||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
|
||||
App\State\Provider\CommandGroupProvider:
|
||||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
|
||||
App\State\Provider\CommandTaskProvider:
|
||||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
|
||||
App\State\Provider\SubnetProvider:
|
||||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
App\State\Provider\TraceProvider:
|
||||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
|
||||
App\State\Provider\RemoteCalendarRuleProvider:
|
||||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
|
||||
App\State\Provider\ImageRepositoryProvider:
|
||||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
|
||||
App\State\Provider\ImageImageRepositoryProvider:
|
||||
bind:
|
||||
$collectionProvider: '@api_platform.doctrine.orm.state.collection_provider'
|
||||
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
services:
|
||||
api_platform.filter.calendar.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'name': ~,}
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.calendar.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'exact'} ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.client.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
|
@ -8,7 +20,29 @@ services:
|
|||
|
||||
api_platform.filter.client.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'partial', 'serialNumber': 'exact', organizationalUnit.id: 'exact' } ]
|
||||
arguments: [ { 'id': 'exact', 'uuid': exact, 'name': 'partial', 'serialNumber': 'exact', 'template.id': 'exact', status: 'exact', organizationalUnit.id: 'exact', mac: 'exact', ip: 'exact', subnet.id: 'exact' } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.client.exist:
|
||||
parent: 'api_platform.doctrine.orm.exists_filter'
|
||||
arguments: [{'subnet': ~, 'template': ~ }]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.command.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'name': ~ }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.command.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'partial'} ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.command.boolean:
|
||||
parent: 'api_platform.doctrine.orm.boolean_filter'
|
||||
arguments: [ { 'enabled': ~, 'readOnly': ~ } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.hardware.order:
|
||||
|
@ -18,6 +52,44 @@ services:
|
|||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.image.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'name': ~ }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.image.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'partial', 'repository.id': 'exact', status: 'exact'} ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.image.boolean:
|
||||
parent: 'api_platform.doctrine.orm.boolean_filter'
|
||||
arguments: [ { 'created': ~ } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
image.repository_filter:
|
||||
parent: 'App\Filter\ImageSearchRepositoryFilter'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.og_live.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'name': ~ }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.og_live.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'partial', 'status': 'exact' } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.og_live.boolean:
|
||||
parent: 'api_platform.doctrine.orm.boolean_filter'
|
||||
arguments: [ { 'isDefault': ~, 'installed': ~ } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.hardware.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'partial' } ]
|
||||
|
@ -35,6 +107,18 @@ services:
|
|||
arguments: [ { 'id': 'exact', 'name': 'exact', 'title': 'exact' } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.operative_system.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'name': ~ }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.operative_system.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'partial' } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.organizational_unit.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
|
@ -47,16 +131,131 @@ services:
|
|||
arguments: [ { id: 'exact', name: 'partial', type: 'exact', parent.id: 'exact'} ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.organizational_unit.group_filter:
|
||||
parent: 'api_platform.serializer.group_filter'
|
||||
arguments: [ 'groups', true, ['organizational-unit:read:collection:short'] ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.partition.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'usage': ~ }
|
||||
$properties: { 'id': ~, 'usage': ~, 'partitionNumber': 'ASC' }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.partition.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'usage': 'exact', 'diskNumber': 'exact' } ]
|
||||
arguments: [ { 'id': 'exact', 'usage': 'exact', 'diskNumber': 'exact', 'client.id': 'exact' } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.pxe_template.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'name': ~ }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.pxe_boot_file.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'template': exact } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.pxe_template.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'partial', } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.pxe_template.boolean:
|
||||
parent: 'api_platform.doctrine.orm.boolean_filter'
|
||||
arguments: [ { 'synchronized': ~ } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.remote_calendar.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'name': ~ }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.remote_calendar.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'partial', } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.repository.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'name': ~ }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.repository.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'partial', 'ip': 'partial', 'status': 'exact'} ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.image_image_repository.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'name': ~ }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.image_image_repository.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'partial', 'ip': 'partial', 'status': 'exact', 'repository.id': 'exact'} ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
repository.not_equal_filter:
|
||||
parent: 'App\Filter\NotEqualIdFilter'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.software.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'name': ~ }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.software.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'partial', type: 'exact'} ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.software_profile.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'description': ~ }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.software_profile.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'description': 'partial' } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.subnet.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'name': ~ }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.subnet.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'name': 'partial', ip: 'exact', nextServer: 'exact', netmask: 'exact', bootFileName: 'partial'} ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.trace.search:
|
||||
parent: 'api_platform.doctrine.orm.search_filter'
|
||||
arguments: [ { 'id': 'exact', 'command.id': 'exact', 'client.id': 'exact', status: 'exact' } ]
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.trace.order:
|
||||
parent: 'api_platform.doctrine.orm.order_filter'
|
||||
arguments:
|
||||
$properties: { 'id': ~, 'command': ~ }
|
||||
$orderParameterName: 'order'
|
||||
tags: [ 'api_platform.filter' ]
|
||||
|
||||
api_platform.filter.user.order:
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
services:
|
||||
App\EventListener\ClientStatusNotifier:
|
||||
tags: ~ # Esto elimina el listener en el entorno de test
|
|
@ -0,0 +1,4 @@
|
|||
# Changelog
|
||||
|
||||
## [Unreleased]
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
ogcore (0.9.2-1) unstable; urgency=medium
|
||||
|
||||
* Added mercure service in docker compose file for deployments.
|
||||
|
||||
-- Manuel Aranda <maranda@qindel.com> Wed, 12 Mar 2025 14:00:00 +0200
|
||||
|
||||
ogcore (0.9.1-1) unstable; urgency=medium
|
||||
|
||||
* Corrección en la cancelación de transmisiones p2p.
|
||||
|
||||
-- Manuel Aranda <maranda@qindel.com> Wed, 12 Mar 2025 13:00:00 +0200
|
||||
|
||||
ogcore (0.9.0-1) unstable; urgency=medium
|
||||
|
||||
* Nueva funcionalidad para tener notificaciones en tiempo real. Instalación de bundle "Mercure".
|
||||
* Creación de EventListener en Symfony, para publicar mensajes en Mercure cuando se realicen cambios en la base de datos.
|
||||
* Nuevo endpoint "backup image". Integración con ogRepository.
|
||||
* Nuevo campo en "usuarios" para escoger la visualización por defecto de la vista "grupos".
|
||||
* Nuevo campo "dns" en "subredes" para gestionar los servidores DNS.
|
||||
* Integración de endpoint ogRepository para verificar la integridad de una imagen.
|
||||
* Nueva funcionalidad para cancelar despliegues de imágenes.
|
||||
* Añadido nuevo campo "cancelado" en trazas.
|
||||
* Cambios en logs: salida redirigida de stderr a file.log.
|
||||
* Modificación en módulo DHCP: gestión de equipos con una única llamada a la API.
|
||||
* Cambios en las respuestas de acciones masivas en equipos para evitar fallos en peticiones parciales.
|
||||
|
||||
-- Manuel Aranda <maranda@qindel.com> Tue, 04 Mar 2025 15:00:00 +0200
|
||||
|
||||
ogcore (0.8.1-1) unstable; urgency=medium
|
||||
|
||||
* Corrección de bug en el deploy de imágenes.
|
||||
|
||||
-- Manuel Aranda <maranda@qindel.com> Tue, 25 Feb 2025 10:00:00 +0200
|
||||
|
||||
ogcore (0.8.0-1) unstable; urgency=medium
|
||||
|
||||
* Nuevos campos en "aulas" para la jerarquía en clientes.
|
||||
* Nueva funcionalidad "imagen global". Integración con ogRepository.
|
||||
* Limpieza en campos "name" y "date" de ogLive. Ahora se parsea el campo "filename" para mejorar la experiencia del usuario.
|
||||
* Corrección de bug que impedía borrar un cliente si tenía una traza enlazada.
|
||||
|
||||
-- Manuel Aranda <maranda@qindel.com> Fri, 10 Jan 2025 12:00:00 +0200
|
||||
|
||||
ogcore (0.7.3-1) unstable; urgency=medium
|
||||
|
||||
* Adaptados cambios en los endpoints para multiselección de clientes.
|
||||
* Se agregó la funcionalidad de importar/exportar. Integración con ogRepository.
|
||||
* Se agregó la funcionalidad de borrar imágenes. Integración con ogRepository.
|
||||
* Se agregó el modo "TORRENT" y "UDPCAST" en el despliegue de imágenes.
|
||||
* Refactorización del webhook de ogRepository.
|
||||
|
||||
-- Manuel Aranda <maranda@qindel.com> Fri, 03 Jan 2025 11:00:00 +0200
|
||||
|
|
@ -0,0 +1 @@
|
|||
12
|
|
@ -0,0 +1,16 @@
|
|||
Source: ogcore
|
||||
Section: web
|
||||
Priority: optional
|
||||
Maintainer: Nicolas Arenas <nicolas.arenas@qindel.com>
|
||||
Build-Depends: debhelper (>= 12), composer, php-cli, php-mysql, php-fpm, libzip-dev, zip, unzip
|
||||
Standards-Version: 4.5.0
|
||||
|
||||
Package: ogcore
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, mariadb-server, systemd, nginx, libzip-dev, zip, unzip,
|
||||
php8.3-opcache, php8.3-bcmath, php8.3-cli, php8.3-curl, php8.3-fpm,
|
||||
php8.3-gd, php8.3-ldap, php8.3-mbstring, php8.3-mysql, php8.3-common,
|
||||
php8.3-xml, php8.3-zip, mercure
|
||||
Description: OpenGnsys Core
|
||||
OgCore package is responsible about management of Opengnsys platform
|
||||
OpenGnsys Core is a platform for system management.
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
INPUT_FILE="changelog"
|
||||
OUTPUT_FILE="CHANGELOG.md"
|
||||
|
||||
echo "# Changelog" > "$OUTPUT_FILE"
|
||||
echo -e "\n## [Unreleased]\n" >> "$OUTPUT_FILE"
|
||||
|
||||
# Procesar el changelog de Debian
|
||||
awk '
|
||||
/^ogcore/ {
|
||||
version = $2
|
||||
gsub(/[()]/, "", version) # Eliminar paréntesis de la versión
|
||||
printf "\n## [%s] - %s\n\n", version, $NF
|
||||
}
|
||||
/^\s*\*/ {
|
||||
gsub(/^\s*\*\s*/, "- ", $0) # Convertir a lista de viñetas
|
||||
print $0 >> "'"$OUTPUT_FILE"'"
|
||||
}
|
||||
' "$INPUT_FILE"
|
|
@ -0,0 +1,43 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Source: <url://example.com>
|
||||
Upstream-Name: ogcore
|
||||
Upstream-Contact: <preferred name and address to reach the upstream project>
|
||||
|
||||
Files:
|
||||
*
|
||||
Copyright:
|
||||
<years> <put author's name and email here>
|
||||
<years> <likewise for another author>
|
||||
License: GPL-3.0+
|
||||
|
||||
Files:
|
||||
debian/*
|
||||
Copyright:
|
||||
2025 root <root@build>
|
||||
License: GPL-3.0+
|
||||
|
||||
License: GPL-3.0+
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
Comment:
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
||||
|
||||
# Please also look if there are files or directories which have a
|
||||
# different copyright/license attached and list them here.
|
||||
# Please avoid picking licenses with terms that are more restrictive than the
|
||||
# packaged work, as it may make Debian's contributions unacceptable upstream.
|
||||
#
|
||||
# If you need, there are some extra license texts available in two places:
|
||||
# /usr/share/debhelper/dh_make/licenses/
|
||||
# /usr/share/common-licenses/
|
|
@ -0,0 +1 @@
|
|||
ogcore
|
|
@ -0,0 +1,2 @@
|
|||
ogcore_1.0.5+develop20250310-1_all.deb web optional
|
||||
ogcore_1.0.5+develop20250310-1_amd64.buildinfo web optional
|
|
@ -0,0 +1,18 @@
|
|||
bin/* /opt/opengnsys/ogcore/api/bin/
|
||||
config/* /opt/opengnsys/ogcore/api/config/
|
||||
migrations/* /opt/opengnsys/ogcore/api/migrations/
|
||||
public/* /opt/opengnsys/ogcore/api/public/
|
||||
src/* /opt/opengnsys/ogcore/api/src/
|
||||
swagger-assets/* /opt/opengnsys/ogcore/api/swagger-assets/
|
||||
templates/* /opt/opengnsys/ogcore/api/templates/
|
||||
translations/* /opt/opengnsys/ogcore/api/translations/
|
||||
var/* /opt/opengnsys/ogcore/api/var/
|
||||
vendor/* /opt/opengnsys/ogcore/api/vendor/
|
||||
composer.json /opt/opengnsys/ogcore/api/
|
||||
composer.lock /opt/opengnsys/ogcore/api/
|
||||
symfony.lock /opt/opengnsys/ogcore/api/
|
||||
.env.local.php /opt/opengnsys/ogcore/api/
|
||||
env.json /opt/opengnsys/ogcore/api/
|
||||
etc /opt/opengnsys/ogcore/
|
||||
docker/certs/* /opt/opengnsys/ogcore/etc/nginx/certs/
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
restore_config_if_modified() {
|
||||
local new="$1"
|
||||
local backup="$1.bak"
|
||||
|
||||
if [ -f "$backup" ]; then
|
||||
if ! cmp -s "$new" "$backup"; then
|
||||
echo ">>> Archivo modificado por el usuario detectado en $new"
|
||||
echo " - Guardando archivo nuevo como ${new}.new"
|
||||
mv -f "$new" "${new}.new"
|
||||
echo " - Restaurando archivo anterior desde backup"
|
||||
mv -f "$backup" "$new"
|
||||
else
|
||||
echo ">>> El archivo $new no ha cambiado desde la última versión, eliminando backup"
|
||||
rm -f "$backup"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
USER="opengnsys"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Detectar si es una instalación nueva o una actualización
|
||||
if [ "$1" = "configure" ] && [ -z "$2" ]; then
|
||||
# Detectar IP de la interfaz de red asociad a la ruta por defecto.
|
||||
|
||||
IP=$(ip -4 route get 8.8.8.8 | grep -oP '(?<=src )[\d.]+')
|
||||
echo ">>> Instalación nueva detectada."
|
||||
|
||||
# Solicitar credenciales solo en instalación nueva
|
||||
db_input high opengnsys/ogcore_adminUser || true
|
||||
db_go
|
||||
db_get opengnsys/ogcore_adminUser
|
||||
ADMIN_USER="$RET"
|
||||
|
||||
db_input high opengnsys/ogcore_adminPass || true
|
||||
db_go
|
||||
db_get opengnsys/ogcore_adminPass
|
||||
ADMIN_PASS="$RET"
|
||||
|
||||
cd /opt/opengnsys/ogcore/api
|
||||
|
||||
# Configuración inicial
|
||||
echo ">>> Configurando base de datos y permisos"
|
||||
mariadb -e "ALTER USER 'root'@'localhost' IDENTIFIED VIA unix_socket OR mysql_native_password USING PASSWORD('root');"
|
||||
|
||||
|
||||
echo ">>> Creando par de claves para JWT"
|
||||
php bin/console lexik:jwt:generate-keypair --overwrite
|
||||
|
||||
echo ">>> Creando base de datos"
|
||||
php bin/console doctrine:database:create --if-not-exists
|
||||
php bin/console doctrine:migrations:migrate --no-interaction
|
||||
|
||||
echo ">>> Cargando datos iniciales"
|
||||
php bin/console opengnsys:load-default-user
|
||||
php bin/console app:load-default-user-groups
|
||||
php bin/console app:load-default-commands
|
||||
php bin/console opengnsys:load-default-menu
|
||||
|
||||
echo ">>> Configurando servidor web y servicios"
|
||||
ln -s /opt/opengnsys/ogcore/etc/nginx/sites-available/ogcore.conf /etc/nginx/sites-enabled/ogcore.conf
|
||||
ln -s /opt/opengnsys/ogcore/etc/nginx/sites-available/mercure.conf /etc/nginx/sites-enabled/mercure.conf
|
||||
ln -s /opt/opengnsys/ogcore/etc/php/8.3/fpm/pool.d/ogcore-fpm.conf /etc/php/8.3/fpm/pool.d/ogcore-fpm.conf
|
||||
ln -s /opt/opengnsys/ogcore/etc/systemd/system/og-mercure.service /etc/systemd/system/og-mercure.service
|
||||
|
||||
echo ">>> Configurando permisos de archivos"
|
||||
chown opengnsys:www-data /opt/opengnsys/
|
||||
chown -R opengnsys:www-data /opt/opengnsys/ogcore
|
||||
systemctl daemon-reload
|
||||
systemctl enable og-mercure
|
||||
systemctl restart og-mercure
|
||||
systemctl restart nginx
|
||||
systemctl restart php8.3-fpm
|
||||
|
||||
#Obteniendo bearer token
|
||||
BEARER=$(curl -sk -X 'POST' 'https://localhost:8443/auth/login' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{ "username": "ogadmin", "password": "12345678" }' | jq -r .token)
|
||||
# Creando nuevo repo
|
||||
curl -skL -X POST 'https://localhost:8443/image-repositories' \
|
||||
-H "Authorization: Bearer $BEARER" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{ \"name\": \"Repository 1\", \"ip\": \"$IP\", \"comments\": \"Repositorio creado automaticamente por oginstaller\" }"
|
||||
# Solo gestionar credenciales en instalación nueva
|
||||
if [ "$ADMIN_USER" == "ogadmin" ]; then
|
||||
echo ">>> Cambiando contraseña de ogadmin"¡
|
||||
OGADMIN_UUID=$(curl -skL "https://localhost:8443/users/?username=ogadmin" \
|
||||
-H 'accept: application/json' \
|
||||
-H "Authorization: Bearer $BEARER" | jq -r '.[0].uuid')
|
||||
curl -skL -X PUT "https://localhost:8443/users/$OGADMIN_UUID/reset-password" \
|
||||
-H 'accept: application/ld+json' \
|
||||
-H 'Content-Type: application/ld+json' \
|
||||
-H "Authorization: Bearer $BEARER" \
|
||||
-d "{ \"currentPassword\": \"12345678\", \"newPassword\": \"$ADMIN_PASS\", \"repeatNewPassword\": \"$ADMIN_PASS\" }"
|
||||
echo ">>> Contraseña de ogadmin cambiada."
|
||||
else
|
||||
echo ">>> Creando nuevo usuario administrador: $ADMIN_USER"
|
||||
curl -skL --location 'https://localhost:8443/users' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--header "Authorization: Bearer $BEARER" \
|
||||
--data "{ \"username\": \"$ADMIN_USER\", \"password\": \"$ADMIN_PASS\", \"roles\": [\"ROLE_SUPER_ADMIN\"] }"
|
||||
|
||||
echo ">>> Usuario administrador $ADMIN_USER creado."
|
||||
fi
|
||||
# Install crontab
|
||||
echo ">>> Configurando cron para comprobar disponibilidad de clientes"
|
||||
cp /opt/opengnsys/ogcore/etc/cron.d/opengnsys-check-clients /etc/cron.d/opengnsys-check-clients
|
||||
chmod 644 /etc/cron.d/opengnsys-check-clients
|
||||
chown root:root /etc/cron.d/opengnsys-check-clients
|
||||
|
||||
elif [ "$1" = "configure" ] && [ -n "$2" ]; then
|
||||
echo ">>> Actualización detectada desde la versión $2"
|
||||
|
||||
# Restaurar archivos de configuración si han sido modificados
|
||||
restore_config_if_modified "/opt/opengnsys/ogcore/etc/nginx/sites-available/ogcore.conf"
|
||||
restore_config_if_modified "/opt/opengnsys/ogcore/etc/nginx/sites-available/mercure.conf"
|
||||
restore_config_if_modified "/opt/opengnsys/ogcore/etc/php/8.3/fpm/pool.d/ogcore-fpm.conf"
|
||||
restore_config_if_modified "/opt/opengnsys/ogcore/etc/systemd/system/og-mercure.service"
|
||||
restore_config_if_modified "/opt/opengnsys/ogcore/api/env.json"
|
||||
|
||||
cd /opt/opengnsys/ogcore/api
|
||||
echo ">>> Aplicando migraciones de base de datos"
|
||||
php bin/console doctrine:migrations:migrate --no-interaction
|
||||
echo ">>> Configurando servidor web y servicios"
|
||||
[ ! -L /etc/nginx/sites-enabled/ogcore.conf ] && ln -s /opt/opengnsys/ogcore/etc/nginx/sites-available/ogcore.conf /etc/nginx/sites-enabled/ogcore.conf
|
||||
[ ! -L /etc/php/8.3/fpm/pool.d/ogcore-fpm.conf ] && ln -s /opt/opengnsys/ogcore/etc/php/8.3/fpm/pool.d/ogcore-fpm.conf /etc/php/8.3/fpm/pool.d/ogcore-fpm.conf
|
||||
[ ! -L /etc/systemd/system/og-mercure.service ] && ln -s /opt/opengnsys/ogcore/etc/systemd/system/og-mercure.service /etc/systemd/system/og-mercure.service
|
||||
echo ">>> Configurando permisos de archivos"
|
||||
chown opengnsys:www-data /opt/opengnsys/
|
||||
chown -R opengnsys:www-data /opt/opengnsys/ogcore
|
||||
if [ ! -f /etc/cron.d/opengnsys-check-clients ]; then
|
||||
echo ">>> Configurando cron para comprobar disponibilidad de clientes"
|
||||
cp /opt/opengnsys/ogcore/etc/cron.d/opengnsys-check-clients /etc/cron.d/opengnsys-check-clients
|
||||
chmod 644 /etc/cron.d/opengnsys-check-clients
|
||||
chown root:root /etc/cron.d/opengnsys-check-clients
|
||||
else
|
||||
echo ">>> El archivo de cron ya existe, no se realizan cambios se ajustan permisos"
|
||||
chmod 644 /etc/cron.d/opengnsys-check-clients
|
||||
chown root:root /etc/cron.d/opengnsys-check-clients
|
||||
fi
|
||||
systemctl daemon-reload
|
||||
systemctl enable og-mercure
|
||||
systemctl restart og-mercure
|
||||
systemctl restart nginx
|
||||
systemctl restart php8.3-fpm
|
||||
fi
|
||||
# Recargar systemd y reiniciar servicios en ambos casos
|
||||
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,6 @@
|
|||
# Automatically added by dh_installdebconf/13.14.1ubuntu5
|
||||
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
|
||||
. /usr/share/debconf/confmodule
|
||||
db_purge
|
||||
fi
|
||||
# End automatically added section
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
backup_file_if_exists() {
|
||||
local original="$1"
|
||||
local backup="$1.bak"
|
||||
|
||||
if [ -e "$original" ]; then
|
||||
echo " - Guardando backup de $original en $backup"
|
||||
cp -a "$original" "$backup"
|
||||
fi
|
||||
}
|
||||
|
||||
CONFIG_FILE="/opt/opengnsys/ogcore/api/env.json"
|
||||
BACKUP_FILE="/opt/opengnsys/ogcore/api/env.json.bak"
|
||||
|
||||
# Asegurarse de que el usuario exista
|
||||
USER="opengnsys"
|
||||
HOME_DIR="/opt/opengnsys"
|
||||
if id "$USER" &>/dev/null; then
|
||||
echo "El usuario $USER ya existe."
|
||||
else
|
||||
echo "Creando el usuario $USER con home en $HOME_DIR."
|
||||
useradd -m -d "$HOME_DIR" -s /bin/bash "$USER"
|
||||
fi
|
||||
|
||||
CONFIG_FILE="/opt/opengnsys/ogcore/api/env.json"
|
||||
BACKUP_FILE="/opt/opengnsys/ogcore/api/env.json.bak"
|
||||
|
||||
# Solo hacemos backup si el archivo existe y es una actualización (posición 1 = upgrade)
|
||||
if [ "$1" = "upgrade" ]; then
|
||||
echo ">>> Backup de archivos de configuración reales en /opt/opengnsys"
|
||||
backup_file_if_exists "/opt/opengnsys/ogcore/etc/nginx/sites-available/ogcore.conf"
|
||||
backup_file_if_exists "/opt/opengnsys/ogcore/etc/nginx/sites-available/mercure.conf"
|
||||
backup_file_if_exists "/opt/opengnsys/ogcore/etc/php/8.3/fpm/pool.d/ogcore-fpm.conf"
|
||||
backup_file_if_exists "/opt/opengnsys/ogcore/etc/systemd/system/og-mercure.service"
|
||||
backup_file_if_exists "/opt/opengnsys/ogcore/api/env.json"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
if [ "$1" = "remove" ] || [ "$1" = "upgrade" ]; then
|
||||
# Eliminar enlaces simbólicos creados en postinst
|
||||
rm -f /etc/nginx/sites-enabled/ogcore.conf
|
||||
rm -f /etc/php/8.3/fpm/pool.d/ogcore-fpm.conf
|
||||
# Deshabilitar el servicio antes de eliminarlo
|
||||
systemctl disable og-mercure || true
|
||||
systemctl stop og-mercure || true
|
||||
systemctl restart nginx || true
|
||||
systemctl restart php8.3-fpm || true
|
||||
rm -f /etc/systemd/system/og-mercure.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,10 @@
|
|||
Template: opengnsys/ogcore_adminUser
|
||||
Type: string
|
||||
Default: ogadmin
|
||||
Description: Introduzca el nombre de usuario para la configuración
|
||||
|
||||
Template: opengnsys/ogcore_adminPass
|
||||
Type: password
|
||||
Default: 12345678
|
||||
Description: Introduzca la contraseña
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
# Ejecutar composer install durante la fase de construcción
|
||||
override_dh_auto_build:
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
export APP_ENV=prod
|
||||
dh_auto_build
|
||||
COMPOSER_ALLOW_SUPERUSER=1 APP_ENV=prod composer install --no-dev --no-interaction --no-progress --optimize-autoloader
|
||||
COMPOSER_ALLOW_SUPERUSER=1 APP_ENV=prod composer dump-env prod
|
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
|
@ -0,0 +1,47 @@
|
|||
services:
|
||||
database:
|
||||
container_name: ogcore-database
|
||||
image: mariadb:10.11
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: ogcore
|
||||
MYSQL_PASSWORD: root
|
||||
MYSQL_USER: admin
|
||||
ports:
|
||||
- 3336:3306
|
||||
volumes:
|
||||
- database_data:/var/lib/mysql
|
||||
networks:
|
||||
- ogcore-network
|
||||
|
||||
nginx:
|
||||
container_name: ogcore-nginx
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/Dockerfile-nginx
|
||||
depends_on:
|
||||
- php
|
||||
ports:
|
||||
- 8080:80
|
||||
volumes:
|
||||
- ./public:/var/www/html/public:cached
|
||||
networks:
|
||||
- ogcore-network
|
||||
image: ogcore-nginx:static
|
||||
|
||||
php:
|
||||
container_name: ogcore-php
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/Dockerfile-jenkins-php
|
||||
depends_on:
|
||||
- database
|
||||
networks:
|
||||
- ogcore-network
|
||||
image: ogcore-php:static
|
||||
|
||||
volumes:
|
||||
database_data:
|
||||
|
||||
networks:
|
||||
ogcore-network:
|
|
@ -0,0 +1,45 @@
|
|||
services:
|
||||
database:
|
||||
container_name: ogcore-database
|
||||
image: mariadb:10.11
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: ogcore
|
||||
MYSQL_PASSWORD: root
|
||||
MYSQL_USER: admin
|
||||
ports:
|
||||
- 3336:3306
|
||||
volumes:
|
||||
- database_data:/var/lib/mysql
|
||||
networks:
|
||||
- ogcore-network
|
||||
|
||||
nginx:
|
||||
container_name: ogcore-nginx
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/Dockerfile-nginx
|
||||
depends_on:
|
||||
- php
|
||||
ports:
|
||||
- 8080:80
|
||||
volumes:
|
||||
- ./public:/var/www/html/public:cached
|
||||
networks:
|
||||
- ogcore-network
|
||||
|
||||
php:
|
||||
container_name: ogcore-php
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/Dockerfile-jenkins-php
|
||||
depends_on:
|
||||
- database
|
||||
networks:
|
||||
- ogcore-network
|
||||
|
||||
volumes:
|
||||
database_data:
|
||||
|
||||
networks:
|
||||
ogcore-network:
|
|
@ -0,0 +1,72 @@
|
|||
services:
|
||||
database:
|
||||
container_name: ogcore-database
|
||||
image: mariadb:10.11
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: ogcore
|
||||
MYSQL_PASSWORD: root
|
||||
MYSQL_USER: admin
|
||||
ports:
|
||||
- 3336:3306
|
||||
volumes:
|
||||
- database_data:/var/lib/mysql
|
||||
networks:
|
||||
- ogcore-network
|
||||
nginx:
|
||||
container_name: ogcore-nginx
|
||||
depends_on:
|
||||
- php
|
||||
ports:
|
||||
- 8080:80
|
||||
- 8443:443
|
||||
- 3000:3000
|
||||
volumes:
|
||||
- ogpublic:/var/www/html/public:cached
|
||||
networks:
|
||||
- ogcore-network
|
||||
image: opengnsys/ogcore-nginx:static
|
||||
|
||||
php:
|
||||
container_name: ogcore-php
|
||||
depends_on:
|
||||
- database
|
||||
volumes:
|
||||
- ogpublic:/var/www/html/public
|
||||
- /opt/opengnsys/ogCore/etc/.env:/var/www/html/.env
|
||||
- /opt/opengnsys/ogCore/etc/env.json://var/www/html/env.json
|
||||
|
||||
networks:
|
||||
- ogcore-network
|
||||
image: opengnsys/ogcore-php:static
|
||||
|
||||
mercure:
|
||||
image: dunglas/mercure
|
||||
restart: unless-stopped
|
||||
container_name: ogcore-mercure
|
||||
environment:
|
||||
# Uncomment the following line to disable HTTPS,
|
||||
SERVER_NAME: ':3000'
|
||||
MERCURE_PUBLISHER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
||||
MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
||||
MERCURE_EXTRA_DIRECTIVES: |
|
||||
cors_origins *
|
||||
# Comment the following line to disable the development mode
|
||||
command: /usr/bin/caddy run --config /etc/caddy/dev.Caddyfile
|
||||
# ports:
|
||||
# - "3000:3000"
|
||||
volumes:
|
||||
- mercure_data:/data
|
||||
- mercure_config:/config
|
||||
networks:
|
||||
- ogcore-network
|
||||
|
||||
volumes:
|
||||
database_data:
|
||||
ogpublic:
|
||||
mercure_data:
|
||||
mercure_config:
|
||||
|
||||
|
||||
networks:
|
||||
ogcore-network:
|
|
@ -23,8 +23,10 @@ services:
|
|||
- php
|
||||
ports:
|
||||
- 8080:80
|
||||
- 8443:443 # Añadir el puerto 443
|
||||
volumes:
|
||||
- ./public:/var/www/html/public:cached
|
||||
- ./docker/certs:/etc/nginx/certs # Montar certificados en Nginx
|
||||
networks:
|
||||
- ogcore-network
|
||||
|
||||
|
@ -37,14 +39,34 @@ services:
|
|||
- ./:/var/www/html
|
||||
depends_on:
|
||||
- database
|
||||
networks:
|
||||
- ogcore-network
|
||||
|
||||
|
||||
mercure:
|
||||
image: dunglas/mercure
|
||||
restart: unless-stopped
|
||||
container_name: ogcore-mercure
|
||||
environment:
|
||||
XDEBUG_CLIENT_HOST: 127.17.0.1
|
||||
XDEBUG_CLIENT_PORT: 9003
|
||||
PHP_IDE_CONFIG: serverName=ogcore
|
||||
# Uncomment the following line to disable HTTPS,
|
||||
SERVER_NAME: ':3000'
|
||||
MERCURE_PUBLISHER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
||||
MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
||||
MERCURE_EXTRA_DIRECTIVES: |
|
||||
cors_origins *
|
||||
# Comment the following line to disable the development mode
|
||||
command: /usr/bin/caddy run --config /etc/caddy/dev.Caddyfile
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- mercure_data:/data
|
||||
- mercure_config:/config
|
||||
networks:
|
||||
- ogcore-network
|
||||
|
||||
volumes:
|
||||
mercure_data:
|
||||
mercure_config:
|
||||
database_data:
|
||||
|
||||
networks:
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
FROM php:8.3-fpm-alpine
|
||||
ENV COMPOSER_ALLOW_SUPERUSER=1
|
||||
|
||||
# Install PHP extensions
|
||||
RUN docker-php-ext-install pdo mysqli pdo_mysql opcache
|
||||
|
||||
# Install Zip and more extension
|
||||
RUN apk add --no-cache bash libzip-dev zip unzip
|
||||
RUN docker-php-ext-install zip
|
||||
|
||||
# Install Composer
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
RUN composer self-update
|
||||
|
||||
# Install bash
|
||||
RUN apk add --no-cache bash git jq moreutils openssh rsync yq
|
||||
|
||||
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
RUN install-php-extensions sockets
|
||||
|
||||
|
||||
COPY . /var/www/html
|
||||
|
|
@ -1,2 +1,7 @@
|
|||
FROM nginx:latest
|
||||
COPY ./docker/default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copiar el archivo de configuración de Nginx
|
||||
COPY ./docker/default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copiar los certificados SSL
|
||||
COPY ./docker/certs /etc/nginx/certs
|
||||
|
|
|
@ -19,12 +19,14 @@ ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/do
|
|||
RUN chmod +x /usr/local/bin/install-php-extensions
|
||||
RUN install-php-extensions sockets
|
||||
|
||||
# Add xdebug
|
||||
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS
|
||||
RUN apk add --update linux-headers
|
||||
RUN pecl install xdebug
|
||||
RUN docker-php-ext-enable xdebug
|
||||
RUN apk del -f .build-deps
|
||||
# Generate SSH keys
|
||||
RUN ssh-keygen -t rsa -b 4096 -f /root/.ssh/id_rsa -N ""
|
||||
|
||||
COPY ./docker/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||
# Optionally, copy public key to a specific location
|
||||
RUN cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys
|
||||
|
||||
# Expose any ports you may need
|
||||
EXPOSE 9000
|
||||
|
||||
# Command to run the PHP-FPM server
|
||||
CMD ["php-fpm"]
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIExTCCAq2gAwIBAgICEAEwDQYJKoZIhvcNAQELBQAwSTELMAkGA1UEBhMCRVMx
|
||||
DzANBgNVBAgMBk1hZHJpZDEPMA0GA1UEBwwGTWFkcmlkMRgwFgYDVQQDDA9jYS51
|
||||
ZHMtdGVzdC5uZXQwHhcNMjQxMDA5MTQyODM3WhcNMjUxMDE5MTQyODM3WjBNMQsw
|
||||
CQYDVQQGEwJFUzEPMA0GA1UECAwGTWFkcmlkMQ8wDQYDVQQHDAZNYWRyaWQxHDAa
|
||||
BgNVBAMME29nY29yZS51ZHMtdGVzdC5uZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IB
|
||||
DwAwggEKAoIBAQDaT0uiHcCwxUtRiJAhMI1VBuUohIzQgBQ1pwOa8gfwJZGn+p5p
|
||||
T6qVrDb2RGWL8kJyR0tohQ6BxwVirAYTs0Az2EzZrh26gAlMhEsmQdWjQuWeHiRk
|
||||
tp+6ELfATSd97LwMe5KgJl80JYQDVHxryPxPTgbxB3tjmp8ErcrhQ58Omq2D6bnd
|
||||
xrKCbgfSoZP+ZyqKY3sNbHIX3632zSwHnu8on2ltZiYbbs1I29onysM4Zj2eAjZP
|
||||
ot3pTzt4uIYV+i0fyY3+STvBda10bgUsoFWAVcdG310oVsginkFbpnhZPPueUklw
|
||||
YtsXPq/yPJwn/tIcbEZ7TO7Pvtlh9RqTne9VAgMBAAGjgbIwga8wHgYDVR0RBBcw
|
||||
FYITb2djb3JlLnVkcy10ZXN0Lm5ldDAdBgNVHQ4EFgQUS+4OUtWxVvTVc1odUFUO
|
||||
UR3dURswbgYDVR0jBGcwZaFNpEswSTELMAkGA1UEBhMCRVMxDzANBgNVBAgMBk1h
|
||||
ZHJpZDEPMA0GA1UEBwwGTWFkcmlkMRgwFgYDVQQDDA9jYS51ZHMtdGVzdC5uZXSC
|
||||
FECd/NYwzaJTHtQ002YnOD3ZKLs0MA0GCSqGSIb3DQEBCwUAA4ICAQAeHA6/lJIv
|
||||
hQTySWOOLhnuWcej1DmQhbDzyrylLUfJe86qV7QCLpasXabDpOQzTK5yBkjCWtV2
|
||||
YiXNx6eT1iGbs70+5fITjj2vhAT9bxi4WH49xU4q+vfxlfxTkA4/ZXTEEmb+B91Q
|
||||
BVEF/7f13UiGV2yu4xbDptr98v/55OeycBgwLdNN7uw7EP6WK8ryLxlxvF+nqt1n
|
||||
YHof/QqRJze3FKHlGhGvx1I3SEE+VwWW5hVbde3HkwlORf5ABr4fxbvudL+kwtMi
|
||||
HmYV2oYvkYQZK0Vfcua0WAn9vKVBgnF6tXdqJTPG7p91dVe7bIbUdFgNBVBdh/md
|
||||
SdESFWCghPQ6WYoB7/1WfPKVQ/0IBe7l8Yx+piNNl4WW2M7lOGf8mbBWUHNAgJjD
|
||||
2u3440PfsPJgBniUuV4ILNhRNGbAjdk86oU8w2Vg6WR7xsQIBcukrHEm5wEW2RkW
|
||||
bZMclPyUOzHh1l4dQZTyOp2LxYNqtfYXQuPDT6tvZV5hLuLMqQfdLVxuoi3KOgo2
|
||||
GfaolX2sW/sA4fx1FAvEvEq7zEvchpocL3EYa/aUNySxMrgjKMc3AtyLYF48D8M7
|
||||
1LZMj61TaPWUUalM/u32fEHhqOXJ1o0VX3gCY7c+hKhGFee8Aiyk/hrB2ED/Q/vR
|
||||
cssM+sHHNwSYI/L+bjEkJDQtVZEztcQODQ==
|
||||
-----END CERTIFICATE-----
|
|
@ -0,0 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDaT0uiHcCwxUtR
|
||||
iJAhMI1VBuUohIzQgBQ1pwOa8gfwJZGn+p5pT6qVrDb2RGWL8kJyR0tohQ6BxwVi
|
||||
rAYTs0Az2EzZrh26gAlMhEsmQdWjQuWeHiRktp+6ELfATSd97LwMe5KgJl80JYQD
|
||||
VHxryPxPTgbxB3tjmp8ErcrhQ58Omq2D6bndxrKCbgfSoZP+ZyqKY3sNbHIX3632
|
||||
zSwHnu8on2ltZiYbbs1I29onysM4Zj2eAjZPot3pTzt4uIYV+i0fyY3+STvBda10
|
||||
bgUsoFWAVcdG310oVsginkFbpnhZPPueUklwYtsXPq/yPJwn/tIcbEZ7TO7Pvtlh
|
||||
9RqTne9VAgMBAAECggEADthSi9EbH8oiv4YaSu96xNvlrFYrHyh+d1GGmLw5lvZv
|
||||
C62qpP2iW3AtAp0PDK+qHgxED/TwUhne/2E0PpWzWXMtcqX45ow7VaUvWQgkB2iO
|
||||
paxmDCUxAl2NqTl15IW7GdwzUcmaMrkUW4ecuFWf9qKXLT+1f8XtZ0uMHrpS8BKr
|
||||
bDM5oeushD6/ES32ecBIG3eJafSMESUux1fq/frzHEajS0fkYqFxi2uLYJdPLXC/
|
||||
YdVan7sIxOU3gxRROFDYLJ1uaksvUMM31oIujuxngdLTrf/K61RJGBFMeu1UIfrO
|
||||
v6/9tqZgLIPTaC1nYMxjD+AtkwlY4C5vsPa8+jKtcQKBgQDz16/d/YSPxoa1QyPD
|
||||
Ae/z+l13DGdk2+PdDavoyb1j11qwl4pgSGIA2uR3XeXg/dtmZaFk+KXUC+mHPsiM
|
||||
TvxjoqjzP8LMXPJkRRzzTAwMjYzI8/ZAmCW+4q4Sxv3Dw4UQd0tCYi9ruMtXhnqp
|
||||
agMKT2CNAikmbWdIu4S5uR6GDQKBgQDlMbfB5yJQsanW29VEJkUv+JBKZvxC7v59
|
||||
2EmZEbW1hqYHR7PA2qvSnNXvsQKRIcJtmrzf3koDhXN3mw59deBgT5FsUQCGxoK8
|
||||
ALMYMKiYcCNLp1rpxoz63lFnSzpD+f2dLBj0sac5Ufw17O6Fjs5+ZqND32UaEXFW
|
||||
CLrjBpPEaQKBgAjXIQEjV9L+l5Oqw3kmcNSflxPh1z3I2xIAlOLzrXIZNKiCVfn3
|
||||
pdXyGaZaOSNXEMU9mgRXH2v4opbMp+iuVGgoVYe8IAvYstD/0HThpO4vk5MVhTAC
|
||||
VBv/i+ASZtDaHdDjAk99z8pQAM9DiN7rgQC2sAFsuqEyBjSU19MD6x9hAoGAOSW1
|
||||
cObF2qMB+y3jNlPoinaK29Jj8fiPgids6nrM+Q8y1LvfKSYdE63BdjuHrVJinVuo
|
||||
3pUZlVkwGlGSQlwi70DHvN9Rp0lWDbSK82wmjaPgWRvIgmPcgSzv1Taft5Vc1FTL
|
||||
gC/Px24W2gdSzgB2onPLH8BTADX7MX2Jw9O/AokCgYBK7kvg1/cmikj176JFn1AM
|
||||
MBCwVKS1fvUyh0bctadVyM+RA22cVvLB5PEbPB+LbyK1PnHB3jivEa954bOuYo39
|
||||
frRrRYZW4iP+oTqx8arcioaMW2K5urFtsqNrYVgkE5KDBAqFGSAyuKTAjftMxGqy
|
||||
tORwgZ9jzgbBC0V8td6fqg==
|
||||
-----END PRIVATE KEY-----
|
|
@ -1,26 +1,71 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /var/www/html/public;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php?$is_args$args;
|
||||
# Redirigir todo el tráfico HTTP a HTTPS
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name localhost;
|
||||
root /var/www/html/public;
|
||||
index index.html index.php;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/ogcore.uds-test.net.crt.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/ogcore.uds-test.net.key.pem;
|
||||
|
||||
|
||||
|
||||
location /opengnsys/rest/ous// {
|
||||
rewrite ^/opengnsys/rest/ous//([0-9]+)/images /opengnsys/rest/ous/$1/images;
|
||||
rewrite ^/opengnsys/rest/ous//([0-9]+)/labs /opengnsys/rest/ous/$1/labs;
|
||||
}
|
||||
|
||||
location ~ ^/index.php(/|$) {
|
||||
# Bloque principal para archivos
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
# Manejo de PHP
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||
internal;
|
||||
fastcgi_param PATH_INFO $request_uri;
|
||||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
|
||||
}
|
||||
|
||||
# Bloque para errores PHP
|
||||
location ~ \.php$ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
error_log /var/log/nginx/error.log;
|
||||
error_log /var/log/nginx/error.log debug;
|
||||
access_log /var/log/nginx/access.log;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 3000 ssl http2;
|
||||
listen [::]:3000 ssl http2;
|
||||
|
||||
|
||||
ssl_certificate /etc/nginx/certs/ogcore.uds-test.net.crt.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/ogcore.uds-test.net.key.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://ogcore-mercure:3000/;
|
||||
proxy_read_timeout 24h;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
|
||||
# Enable fast reply in SSE
|
||||
proxy_buffering off;
|
||||
|
||||
## Be sure to set USE_FORWARDED_HEADERS=1 to allow the hub to use those headers ##
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
xdebug.mode=debug
|
||||
xdebug.start_with_request=trigger
|
||||
xdebug.discover_client_host = 1
|
||||
xdebug.client_host=${XDEBUG_CLIENT_HOST}
|
||||
xdebug.client_port=${XDEBUG_CLIENT_PORT}
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Instalar certificados CA de Symfony si no existen
|
||||
if [ ! -f /root/.symfony*/cacert.pem ]; then
|
||||
symfony server:ca:install
|
||||
fi
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"vars": {
|
||||
"OG_BOOT_API_URL": "192.168.68.51:8082",
|
||||
"OG_DHCP_API_URL": "192.168.68.51:8081",
|
||||
"OG_CORE_IP": "192.168.68.62",
|
||||
"OG_LOG_IP": "192.168.68.51",
|
||||
"UDS_AUTH_LOGIN": "test",
|
||||
"UDS_AUTH_USERNAME": "test",
|
||||
"UDS_AUTH_PASSWORD": "test",
|
||||
"UDS_URL": "https:\/\/localhost:8087\/uds\/rest\/"
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
*/5 * * * * opengnsys php -d memory_limit=512M /opt/opengnsys/ogcore/api/bin/console opengnsys:check-client-availability >> /opt/opengnsys/ogcore/api/var/log/cron.log 2>&1
|
|
@ -0,0 +1,4 @@
|
|||
SERVER_NAME=":3001"
|
||||
MERCURE_PUBLISHER_JWT_KEY="!ChangeThisMercureHubJWTSecretKey!"
|
||||
MERCURE_SUBSCRIBER_JWT_KEY="!ChangeThisMercureHubJWTSecretKey!"
|
||||
MERCURE_EXTRA_DIRECTIVES="cors_origins *"
|
|
@ -0,0 +1,44 @@
|
|||
# Learn how to configure the Mercure.rocks Hub on https://mercure.rocks/docs/hub/config
|
||||
{
|
||||
{$GLOBAL_OPTIONS}
|
||||
}
|
||||
|
||||
{$CADDY_EXTRA_CONFIG}
|
||||
|
||||
{$SERVER_NAME:localhost} {
|
||||
log {
|
||||
format filter {
|
||||
fields {
|
||||
request>uri query {
|
||||
replace authorization REDACTED
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
encode zstd gzip
|
||||
|
||||
mercure {
|
||||
# Publisher JWT key
|
||||
publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG}
|
||||
# Subscriber JWT key
|
||||
subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG}
|
||||
# Permissive configuration for the development environment
|
||||
cors_origins *
|
||||
publish_origins *
|
||||
demo
|
||||
anonymous
|
||||
subscriptions
|
||||
# Extra directives
|
||||
{$MERCURE_EXTRA_DIRECTIVES}
|
||||
}
|
||||
|
||||
{$CADDY_SERVER_EXTRA_DIRECTIVES}
|
||||
|
||||
redir / /.well-known/mercure/ui/
|
||||
|
||||
respond /healthz 200
|
||||
respond /robots.txt `User-agent: *
|
||||
Disallow: /`
|
||||
respond "Not Found" 404
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
server {
|
||||
listen 3000 ssl http2;
|
||||
listen [::]:3000 ssl http2;
|
||||
|
||||
|
||||
ssl_certificate /opt/opengnsys/ogcore/etc/nginx/certs/ogcore.uds-test.net.crt.pem;
|
||||
ssl_certificate_key /opt/opengnsys/ogcore/etc/nginx/certs/ogcore.uds-test.net.key.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:3001/;
|
||||
proxy_read_timeout 24h;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
|
||||
# Enable fast reply in SSE
|
||||
proxy_buffering off;
|
||||
|
||||
## Be sure to set USE_FORWARDED_HEADERS=1 to allow the hub to use those headers ##
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
server {
|
||||
listen 8443 ssl;
|
||||
server_name _;
|
||||
root /opt/opengnsys/ogcore/api/public/;
|
||||
index index.html index.php;
|
||||
|
||||
ssl_certificate /opt/opengnsys/ogcore/etc/nginx/certs/ogcore.uds-test.net.crt.pem;
|
||||
ssl_certificate_key /opt/opengnsys/ogcore/etc/nginx/certs/ogcore.uds-test.net.key.pem;
|
||||
|
||||
location /opengnsys/rest/ous// {
|
||||
rewrite ^/opengnsys/rest/ous//([0-9]+)/images /opengnsys/rest/ous/$1/images;
|
||||
rewrite ^/opengnsys/rest/ous//([0-9]+)/labs /opengnsys/rest/ous/$1/labs;
|
||||
}
|
||||
|
||||
# Bloque principal para archivos
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
# Manejo de PHP
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/php/php8.3-fpm-ogcore.sock;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $request_uri;
|
||||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
|
||||
}
|
||||
|
||||
# Bloque para errores PHP
|
||||
location ~ \.php$ {
|
||||
return 404;
|
||||
}
|
||||
error_log /var/log/nginx/ogcore-error.log;
|
||||
access_log /var/log/nginx/ogcore-access.log;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
[ogcore]
|
||||
user = opengnsys
|
||||
group = www-data
|
||||
listen = /run/php/php8.3-fpm-ogcore.sock
|
||||
listen.owner = opengnsys
|
||||
listen.group = www-data
|
||||
pm = dynamic
|
||||
pm.max_children = 5
|
||||
pm.start_servers = 2
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
[Unit]
|
||||
Description=Mercure Hub
|
||||
After=network.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=opengnsys
|
||||
Group=opengnsys
|
||||
WorkingDirectory=/opt/opengnsys/ogcore/
|
||||
|
||||
# Cargar variables de entorno desde archivo
|
||||
EnvironmentFile=/opt/opengnsys/ogcore/etc/mercure/mercure-og.env
|
||||
|
||||
# Validar configuración antes de arrancar
|
||||
ExecStartPre=/bin/sh -c '/usr/bin/mercure adapt -c /opt/opengnsys/ogcore/etc/mercure/mercure.orig.conf --envfile /opt/opengnsys/ogcore/etc/mercure/mercure-og.env > /opt/opengnsys/ogcore/etc/mercure/mercure.config'
|
||||
ExecStartPre=/bin/sh -c '/usr/bin/mercure fmt --overwrite -c /opt/opengnsys/ogcore/etc/mercure/mercure.config'
|
||||
|
||||
# Iniciar y detener el servicio con la configuración generada
|
||||
ExecStart=/usr/bin/mercure run -c /opt/opengnsys/ogcore/etc/mercure/mercure.config --envfile /opt/opengnsys/ogcore/etc/mercure/mercure-og.env
|
||||
ExecStop=/usr/bin/mercure stop -c /opt/opengnsys/ogcore/etc/mercure/mercure.config
|
||||
|
||||
Restart=always
|
||||
RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,81 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240617113606 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE client (id INT AUTO_INCREMENT NOT NULL, organizational_unit_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, serial_number VARCHAR(255) DEFAULT NULL, netiface VARCHAR(255) DEFAULT NULL, net_driver VARCHAR(255) DEFAULT NULL, mac VARCHAR(255) DEFAULT NULL, ip VARCHAR(255) DEFAULT NULL, status VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_C7440455D17F50A6 (uuid), INDEX IDX_C7440455FB84408A (organizational_unit_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE hardware (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, type VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_FE99E9E0D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE hardware_profile (id INT AUTO_INCREMENT NOT NULL, organizational_unit_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, comments VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_2D9A2460D17F50A6 (uuid), INDEX IDX_2D9A2460FB84408A (organizational_unit_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE hardware_profile_hardware (hardware_profile_id INT NOT NULL, hardware_id INT NOT NULL, INDEX IDX_18C7E12CFA495C1 (hardware_profile_id), INDEX IDX_18C7E12C9CC762B (hardware_id), PRIMARY KEY(hardware_profile_id, hardware_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE menu (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, title VARCHAR(255) NOT NULL, resolution VARCHAR(255) NOT NULL, comments VARCHAR(255) DEFAULT NULL, public_url VARCHAR(255) DEFAULT NULL, private_url VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_7D053A93D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE network_settings (id INT AUTO_INCREMENT NOT NULL, menu_id INT DEFAULT NULL, hardware_profile_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, proxy VARCHAR(255) DEFAULT NULL, dns VARCHAR(255) DEFAULT NULL, netmask VARCHAR(255) DEFAULT NULL, router VARCHAR(255) DEFAULT NULL, ntp VARCHAR(255) DEFAULT NULL, p2p_time INT DEFAULT NULL, p2p_mode VARCHAR(255) DEFAULT NULL, mcast_ip VARCHAR(255) DEFAULT NULL, mcast_speed INT DEFAULT NULL, mcast_mode VARCHAR(255) DEFAULT NULL, mcast_port INT DEFAULT NULL, validation TINYINT(1) DEFAULT NULL, UNIQUE INDEX UNIQ_48869B54D17F50A6 (uuid), INDEX IDX_48869B54CCD7E912 (menu_id), INDEX IDX_48869B54CFA495C1 (hardware_profile_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE organizational_unit (id INT AUTO_INCREMENT NOT NULL, parent_id INT DEFAULT NULL, network_settings_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, comments VARCHAR(255) DEFAULT NULL, path VARCHAR(255) DEFAULT NULL, level INT DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, type VARCHAR(255) NOT NULL, location VARCHAR(255) DEFAULT NULL, projector TINYINT(1) DEFAULT NULL, board TINYINT(1) DEFAULT NULL, capacity INT DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_749AEB2DD17F50A6 (uuid), INDEX IDX_749AEB2D727ACA70 (parent_id), INDEX IDX_749AEB2D9B9A36D0 (network_settings_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE `partition` (id INT AUTO_INCREMENT NOT NULL, client_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, disk_number INT DEFAULT NULL, partition_number INT DEFAULT NULL, partition_code VARCHAR(255) DEFAULT NULL, size INT NOT NULL, cache_content VARCHAR(255) DEFAULT NULL, filesystem VARCHAR(255) DEFAULT NULL, os_name VARCHAR(255) NOT NULL, memory_usage INT NOT NULL, UNIQUE INDEX UNIQ_9EB910E4D17F50A6 (uuid), INDEX IDX_9EB910E419EB6921 (client_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE refresh_tokens (id INT AUTO_INCREMENT NOT NULL, refresh_token VARCHAR(128) NOT NULL, username VARCHAR(255) NOT NULL, valid DATETIME NOT NULL, UNIQUE INDEX UNIQ_9BACE7E1C74F2195 (refresh_token), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, username VARCHAR(180) NOT NULL, roles JSON NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_8D93D649D17F50A6 (uuid), UNIQUE INDEX UNIQ_IDENTIFIER_USERNAME (username), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE user_organizational_unit (user_id INT NOT NULL, organizational_unit_id INT NOT NULL, INDEX IDX_5E59845FA76ED395 (user_id), INDEX IDX_5E59845FFB84408A (organizational_unit_id), PRIMARY KEY(user_id, organizational_unit_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE user_group (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, permissions JSON NOT NULL COMMENT \'(DC2Type:json)\', name VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_8F02BF9DD17F50A6 (uuid), UNIQUE INDEX UNIQ_IDENTIFIER_NAME (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE user_group_user (user_group_id INT NOT NULL, user_id INT NOT NULL, INDEX IDX_3AE4BD51ED93D47 (user_group_id), INDEX IDX_3AE4BD5A76ED395 (user_id), PRIMARY KEY(user_group_id, user_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455FB84408A FOREIGN KEY (organizational_unit_id) REFERENCES organizational_unit (id)');
|
||||
$this->addSql('ALTER TABLE hardware_profile ADD CONSTRAINT FK_2D9A2460FB84408A FOREIGN KEY (organizational_unit_id) REFERENCES organizational_unit (id)');
|
||||
$this->addSql('ALTER TABLE hardware_profile_hardware ADD CONSTRAINT FK_18C7E12CFA495C1 FOREIGN KEY (hardware_profile_id) REFERENCES hardware_profile (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE hardware_profile_hardware ADD CONSTRAINT FK_18C7E12C9CC762B FOREIGN KEY (hardware_id) REFERENCES hardware (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE network_settings ADD CONSTRAINT FK_48869B54CCD7E912 FOREIGN KEY (menu_id) REFERENCES menu (id)');
|
||||
$this->addSql('ALTER TABLE network_settings ADD CONSTRAINT FK_48869B54CFA495C1 FOREIGN KEY (hardware_profile_id) REFERENCES hardware_profile (id)');
|
||||
$this->addSql('ALTER TABLE organizational_unit ADD CONSTRAINT FK_749AEB2D727ACA70 FOREIGN KEY (parent_id) REFERENCES organizational_unit (id) ON DELETE SET NULL');
|
||||
$this->addSql('ALTER TABLE organizational_unit ADD CONSTRAINT FK_749AEB2D9B9A36D0 FOREIGN KEY (network_settings_id) REFERENCES network_settings (id)');
|
||||
$this->addSql('ALTER TABLE `partition` ADD CONSTRAINT FK_9EB910E419EB6921 FOREIGN KEY (client_id) REFERENCES client (id)');
|
||||
$this->addSql('ALTER TABLE user_organizational_unit ADD CONSTRAINT FK_5E59845FA76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE user_organizational_unit ADD CONSTRAINT FK_5E59845FFB84408A FOREIGN KEY (organizational_unit_id) REFERENCES organizational_unit (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE user_group_user ADD CONSTRAINT FK_3AE4BD51ED93D47 FOREIGN KEY (user_group_id) REFERENCES user_group (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE user_group_user ADD CONSTRAINT FK_3AE4BD5A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455FB84408A');
|
||||
$this->addSql('ALTER TABLE hardware_profile DROP FOREIGN KEY FK_2D9A2460FB84408A');
|
||||
$this->addSql('ALTER TABLE hardware_profile_hardware DROP FOREIGN KEY FK_18C7E12CFA495C1');
|
||||
$this->addSql('ALTER TABLE hardware_profile_hardware DROP FOREIGN KEY FK_18C7E12C9CC762B');
|
||||
$this->addSql('ALTER TABLE network_settings DROP FOREIGN KEY FK_48869B54CCD7E912');
|
||||
$this->addSql('ALTER TABLE network_settings DROP FOREIGN KEY FK_48869B54CFA495C1');
|
||||
$this->addSql('ALTER TABLE organizational_unit DROP FOREIGN KEY FK_749AEB2D727ACA70');
|
||||
$this->addSql('ALTER TABLE organizational_unit DROP FOREIGN KEY FK_749AEB2D9B9A36D0');
|
||||
$this->addSql('ALTER TABLE `partition` DROP FOREIGN KEY FK_9EB910E419EB6921');
|
||||
$this->addSql('ALTER TABLE user_organizational_unit DROP FOREIGN KEY FK_5E59845FA76ED395');
|
||||
$this->addSql('ALTER TABLE user_organizational_unit DROP FOREIGN KEY FK_5E59845FFB84408A');
|
||||
$this->addSql('ALTER TABLE user_group_user DROP FOREIGN KEY FK_3AE4BD51ED93D47');
|
||||
$this->addSql('ALTER TABLE user_group_user DROP FOREIGN KEY FK_3AE4BD5A76ED395');
|
||||
$this->addSql('DROP TABLE client');
|
||||
$this->addSql('DROP TABLE hardware');
|
||||
$this->addSql('DROP TABLE hardware_profile');
|
||||
$this->addSql('DROP TABLE hardware_profile_hardware');
|
||||
$this->addSql('DROP TABLE menu');
|
||||
$this->addSql('DROP TABLE network_settings');
|
||||
$this->addSql('DROP TABLE organizational_unit');
|
||||
$this->addSql('DROP TABLE `partition`');
|
||||
$this->addSql('DROP TABLE refresh_tokens');
|
||||
$this->addSql('DROP TABLE user');
|
||||
$this->addSql('DROP TABLE user_organizational_unit');
|
||||
$this->addSql('DROP TABLE user_group');
|
||||
$this->addSql('DROP TABLE user_group_user');
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240618062825 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE client ADD menu_id INT DEFAULT NULL, ADD hardware_profile_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455CCD7E912 FOREIGN KEY (menu_id) REFERENCES menu (id)');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455CFA495C1 FOREIGN KEY (hardware_profile_id) REFERENCES hardware_profile (id)');
|
||||
$this->addSql('CREATE INDEX IDX_C7440455CCD7E912 ON client (menu_id)');
|
||||
$this->addSql('CREATE INDEX IDX_C7440455CFA495C1 ON client (hardware_profile_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455CCD7E912');
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455CFA495C1');
|
||||
$this->addSql('DROP INDEX IDX_C7440455CCD7E912 ON client');
|
||||
$this->addSql('DROP INDEX IDX_C7440455CFA495C1 ON client');
|
||||
$this->addSql('ALTER TABLE client DROP menu_id, DROP hardware_profile_id');
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240618083013 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE hardware_type (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_2AA5A113D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE operative_system (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_E9C44095D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE operative_system_type (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_4A13A156D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE hardware ADD type_id INT DEFAULT NULL, DROP type');
|
||||
$this->addSql('ALTER TABLE hardware ADD CONSTRAINT FK_FE99E9E0C54C8C93 FOREIGN KEY (type_id) REFERENCES hardware_type (id)');
|
||||
$this->addSql('CREATE INDEX IDX_FE99E9E0C54C8C93 ON hardware (type_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE hardware DROP FOREIGN KEY FK_FE99E9E0C54C8C93');
|
||||
$this->addSql('DROP TABLE hardware_type');
|
||||
$this->addSql('DROP TABLE operative_system');
|
||||
$this->addSql('DROP TABLE operative_system_type');
|
||||
$this->addSql('DROP INDEX IDX_FE99E9E0C54C8C93 ON hardware');
|
||||
$this->addSql('ALTER TABLE hardware ADD type VARCHAR(255) DEFAULT NULL, DROP type_id');
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240619104206 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE `partition` ADD operative_system_id INT DEFAULT NULL, DROP os_name');
|
||||
$this->addSql('ALTER TABLE `partition` ADD CONSTRAINT FK_9EB910E4F1E9F66E FOREIGN KEY (operative_system_id) REFERENCES operative_system (id)');
|
||||
$this->addSql('CREATE INDEX IDX_9EB910E4F1E9F66E ON `partition` (operative_system_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE `partition` DROP FOREIGN KEY FK_9EB910E4F1E9F66E');
|
||||
$this->addSql('DROP INDEX IDX_9EB910E4F1E9F66E ON `partition`');
|
||||
$this->addSql('ALTER TABLE `partition` ADD os_name VARCHAR(255) NOT NULL, DROP operative_system_id');
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240620100039 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE `partition` DROP FOREIGN KEY FK_9EB910E419EB6921');
|
||||
$this->addSql('ALTER TABLE `partition` ADD CONSTRAINT FK_9EB910E419EB6921 FOREIGN KEY (client_id) REFERENCES client (id) ON DELETE CASCADE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE `partition` DROP FOREIGN KEY FK_9EB910E419EB6921');
|
||||
$this->addSql('ALTER TABLE `partition` ADD CONSTRAINT FK_9EB910E419EB6921 FOREIGN KEY (client_id) REFERENCES client (id) ON DELETE SET NULL');
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240702132742 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE software (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_77D068CFD17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE software_profile (id INT AUTO_INCREMENT NOT NULL, organizational_unit_id INT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, comments VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_B70C3C9BD17F50A6 (uuid), INDEX IDX_B70C3C9BFB84408A (organizational_unit_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE software_profile_software (software_profile_id INT NOT NULL, software_id INT NOT NULL, INDEX IDX_3DDFEC7ED42A742 (software_profile_id), INDEX IDX_3DDFEC7D7452741 (software_id), PRIMARY KEY(software_profile_id, software_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE software_profile ADD CONSTRAINT FK_B70C3C9BFB84408A FOREIGN KEY (organizational_unit_id) REFERENCES organizational_unit (id)');
|
||||
$this->addSql('ALTER TABLE software_profile_software ADD CONSTRAINT FK_3DDFEC7ED42A742 FOREIGN KEY (software_profile_id) REFERENCES software_profile (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE software_profile_software ADD CONSTRAINT FK_3DDFEC7D7452741 FOREIGN KEY (software_id) REFERENCES software (id) ON DELETE CASCADE');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE software_profile DROP FOREIGN KEY FK_B70C3C9BFB84408A');
|
||||
$this->addSql('ALTER TABLE software_profile_software DROP FOREIGN KEY FK_3DDFEC7ED42A742');
|
||||
$this->addSql('ALTER TABLE software_profile_software DROP FOREIGN KEY FK_3DDFEC7D7452741');
|
||||
$this->addSql('DROP TABLE software');
|
||||
$this->addSql('DROP TABLE software_profile');
|
||||
$this->addSql('DROP TABLE software_profile_software');
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240703090301 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE image (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, software_profile_id INT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, comments VARCHAR(255) DEFAULT NULL, path VARCHAR(255) NOT NULL, type VARCHAR(255) NOT NULL, revision VARCHAR(255) DEFAULT NULL, info VARCHAR(255) DEFAULT NULL, size INT NOT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_C53D045FD17F50A6 (uuid), INDEX IDX_C53D045F19EB6921 (client_id), INDEX IDX_C53D045FED42A742 (software_profile_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE image ADD CONSTRAINT FK_C53D045F19EB6921 FOREIGN KEY (client_id) REFERENCES client (id)');
|
||||
$this->addSql('ALTER TABLE image ADD CONSTRAINT FK_C53D045FED42A742 FOREIGN KEY (software_profile_id) REFERENCES software_profile (id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE image DROP FOREIGN KEY FK_C53D045F19EB6921');
|
||||
$this->addSql('ALTER TABLE image DROP FOREIGN KEY FK_C53D045FED42A742');
|
||||
$this->addSql('DROP TABLE image');
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240715084147 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE user_user_group (user_id INT NOT NULL, user_group_id INT NOT NULL, INDEX IDX_28657971A76ED395 (user_id), INDEX IDX_286579711ED93D47 (user_group_id), PRIMARY KEY(user_id, user_group_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE user_user_group ADD CONSTRAINT FK_28657971A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE user_user_group ADD CONSTRAINT FK_286579711ED93D47 FOREIGN KEY (user_group_id) REFERENCES user_group (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE user_group_user DROP FOREIGN KEY FK_3AE4BD51ED93D47');
|
||||
$this->addSql('ALTER TABLE user_group_user DROP FOREIGN KEY FK_3AE4BD5A76ED395');
|
||||
$this->addSql('DROP TABLE user_group_user');
|
||||
$this->addSql('ALTER TABLE hardware_profile CHANGE organizational_unit_id organizational_unit_id INT NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE user_group_user (user_group_id INT NOT NULL, user_id INT NOT NULL, INDEX IDX_3AE4BD5A76ED395 (user_id), INDEX IDX_3AE4BD51ED93D47 (user_group_id), PRIMARY KEY(user_group_id, user_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
|
||||
$this->addSql('ALTER TABLE user_group_user ADD CONSTRAINT FK_3AE4BD51ED93D47 FOREIGN KEY (user_group_id) REFERENCES user_group (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE user_group_user ADD CONSTRAINT FK_3AE4BD5A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE user_user_group DROP FOREIGN KEY FK_28657971A76ED395');
|
||||
$this->addSql('ALTER TABLE user_user_group DROP FOREIGN KEY FK_286579711ED93D47');
|
||||
$this->addSql('DROP TABLE user_user_group');
|
||||
$this->addSql('ALTER TABLE hardware_profile CHANGE organizational_unit_id organizational_unit_id INT DEFAULT NULL');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,189 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241120160808 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE client (id INT AUTO_INCREMENT NOT NULL, organizational_unit_id INT DEFAULT NULL, menu_id INT DEFAULT NULL, hardware_profile_id INT DEFAULT NULL, template_id INT DEFAULT NULL, repository_id INT DEFAULT NULL, subnet_id INT DEFAULT NULL, og_live_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, serial_number VARCHAR(255) DEFAULT NULL, netiface VARCHAR(255) DEFAULT NULL, net_driver VARCHAR(255) DEFAULT NULL, mac VARCHAR(255) DEFAULT NULL, ip VARCHAR(255) DEFAULT NULL, status VARCHAR(255) DEFAULT NULL, validation TINYINT(1) DEFAULT NULL, position JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', maintenance TINYINT(1) NOT NULL, agent_job_id VARCHAR(255) DEFAULT NULL, pxe_sync TINYINT(1) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_C7440455D17F50A6 (uuid), INDEX IDX_C7440455FB84408A (organizational_unit_id), INDEX IDX_C7440455CCD7E912 (menu_id), INDEX IDX_C7440455CFA495C1 (hardware_profile_id), INDEX IDX_C74404555DA0FB8 (template_id), INDEX IDX_C744045550C9D4F7 (repository_id), INDEX IDX_C7440455C9CF9478 (subnet_id), INDEX IDX_C7440455F7E54CF3 (og_live_id), UNIQUE INDEX UNIQ_IDENTIFIER_IP (ip), UNIQUE INDEX UNIQ_IDENTIFIER_MAC (mac), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE command (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, script LONGTEXT NOT NULL, comments VARCHAR(255) DEFAULT NULL, read_only TINYINT(1) NOT NULL, name VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_8ECAEAD4D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE command_group (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_FE6811F6D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE command_group_command (command_group_id INT NOT NULL, command_id INT NOT NULL, INDEX IDX_118CE215C7B800D6 (command_group_id), INDEX IDX_118CE21533E1689A (command_id), PRIMARY KEY(command_group_id, command_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE command_task (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, datetime DATETIME NOT NULL, notes VARCHAR(255) DEFAULT NULL, status VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_F3D475A8D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE command_task_command (command_task_id INT NOT NULL, command_id INT NOT NULL, INDEX IDX_BB417CA862DC5265 (command_task_id), INDEX IDX_BB417CA833E1689A (command_id), PRIMARY KEY(command_task_id, command_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE command_task_command_group (command_task_id INT NOT NULL, command_group_id INT NOT NULL, INDEX IDX_C43618BD62DC5265 (command_task_id), INDEX IDX_C43618BDC7B800D6 (command_group_id), PRIMARY KEY(command_task_id, command_group_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE command_task_client (command_task_id INT NOT NULL, client_id INT NOT NULL, INDEX IDX_F97A827D62DC5265 (command_task_id), INDEX IDX_F97A827D19EB6921 (client_id), PRIMARY KEY(command_task_id, client_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE hardware (id INT AUTO_INCREMENT NOT NULL, type_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_FE99E9E0D17F50A6 (uuid), INDEX IDX_FE99E9E0C54C8C93 (type_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE hardware_profile (id INT AUTO_INCREMENT NOT NULL, organizational_unit_id INT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, comments VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_2D9A2460D17F50A6 (uuid), INDEX IDX_2D9A2460FB84408A (organizational_unit_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE hardware_profile_hardware (hardware_profile_id INT NOT NULL, hardware_id INT NOT NULL, INDEX IDX_18C7E12CFA495C1 (hardware_profile_id), INDEX IDX_18C7E12C9CC762B (hardware_id), PRIMARY KEY(hardware_profile_id, hardware_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE hardware_type (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_2AA5A113D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE image (id INT AUTO_INCREMENT NOT NULL, software_profile_id INT DEFAULT NULL, repository_id INT NOT NULL, parent_id INT DEFAULT NULL, client_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, comments VARCHAR(255) DEFAULT NULL, path VARCHAR(255) DEFAULT NULL, type VARCHAR(255) DEFAULT NULL, revision VARCHAR(255) DEFAULT NULL, info VARCHAR(255) DEFAULT NULL, size INT DEFAULT NULL, remote_pc TINYINT(1) NOT NULL, partition_info VARCHAR(255) DEFAULT NULL, created TINYINT(1) DEFAULT NULL, image_fullsum VARCHAR(255) DEFAULT NULL, status VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_C53D045FD17F50A6 (uuid), INDEX IDX_C53D045FED42A742 (software_profile_id), INDEX IDX_C53D045F50C9D4F7 (repository_id), INDEX IDX_C53D045F727ACA70 (parent_id), INDEX IDX_C53D045F19EB6921 (client_id), UNIQUE INDEX UNIQ_IDENTIFIER_NAME (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE image_repository (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, ip VARCHAR(255) NOT NULL, comments VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_302040FBD17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE menu (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, title VARCHAR(255) NOT NULL, resolution VARCHAR(255) NOT NULL, comments VARCHAR(255) DEFAULT NULL, public_url VARCHAR(255) DEFAULT NULL, private_url VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_7D053A93D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE network_settings (id INT AUTO_INCREMENT NOT NULL, menu_id INT DEFAULT NULL, hardware_profile_id INT DEFAULT NULL, repository_id INT DEFAULT NULL, og_live_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, next_server VARCHAR(255) DEFAULT NULL, boot_file_name VARCHAR(255) DEFAULT NULL, proxy VARCHAR(255) DEFAULT NULL, dns VARCHAR(255) DEFAULT NULL, netmask VARCHAR(255) DEFAULT NULL, router VARCHAR(255) DEFAULT NULL, ntp VARCHAR(255) DEFAULT NULL, p2p_time INT DEFAULT NULL, p2p_mode VARCHAR(255) DEFAULT NULL, mcast_ip VARCHAR(255) DEFAULT NULL, mcast_speed INT DEFAULT NULL, mcast_mode VARCHAR(255) DEFAULT NULL, mcast_port INT DEFAULT NULL, validation TINYINT(1) DEFAULT NULL, og_log VARCHAR(255) DEFAULT NULL, og_share VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_48869B54D17F50A6 (uuid), INDEX IDX_48869B54CCD7E912 (menu_id), INDEX IDX_48869B54CFA495C1 (hardware_profile_id), INDEX IDX_48869B5450C9D4F7 (repository_id), INDEX IDX_48869B54F7E54CF3 (og_live_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE og_live (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, download_url VARCHAR(255) DEFAULT NULL, checksum VARCHAR(255) DEFAULT NULL, distribution VARCHAR(255) DEFAULT NULL, kernel VARCHAR(255) DEFAULT NULL, architecture VARCHAR(255) DEFAULT NULL, revision VARCHAR(255) DEFAULT NULL, directory VARCHAR(255) DEFAULT NULL, filename VARCHAR(255) DEFAULT NULL, installed TINYINT(1) DEFAULT NULL, is_default TINYINT(1) DEFAULT NULL, status VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, synchronized TINYINT(1) DEFAULT NULL, UNIQUE INDEX UNIQ_3D6B7739D17F50A6 (uuid), UNIQUE INDEX UNIQ_IDENTIFIER_NAME (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE operative_system (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_E9C44095D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE operative_system_type (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_4A13A156D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE organizational_unit (id INT AUTO_INCREMENT NOT NULL, parent_id INT DEFAULT NULL, network_settings_id INT DEFAULT NULL, subnet_id INT DEFAULT NULL, remote_calendar_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, comments VARCHAR(255) DEFAULT NULL, path VARCHAR(255) DEFAULT NULL, level INT DEFAULT NULL, slug VARCHAR(255) DEFAULT NULL, type VARCHAR(255) NOT NULL, location VARCHAR(255) DEFAULT NULL, projector TINYINT(1) DEFAULT NULL, board TINYINT(1) DEFAULT NULL, capacity INT DEFAULT NULL, remote_pc TINYINT(1) NOT NULL, reserved TINYINT(1) NOT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_749AEB2DD17F50A6 (uuid), INDEX IDX_749AEB2D727ACA70 (parent_id), INDEX IDX_749AEB2D9B9A36D0 (network_settings_id), INDEX IDX_749AEB2DC9CF9478 (subnet_id), INDEX IDX_749AEB2DC56641EE (remote_calendar_id), UNIQUE INDEX UNIQ_IDENTIFIER_NAME (name, parent_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE `partition` (id INT AUTO_INCREMENT NOT NULL, client_id INT DEFAULT NULL, operative_system_id INT DEFAULT NULL, image_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, disk_number INT DEFAULT NULL, partition_number INT DEFAULT NULL, partition_code VARCHAR(255) DEFAULT NULL, size INT NOT NULL, cache_content VARCHAR(255) DEFAULT NULL, filesystem VARCHAR(255) DEFAULT NULL, memory_usage INT NOT NULL, UNIQUE INDEX UNIQ_9EB910E4D17F50A6 (uuid), INDEX IDX_9EB910E419EB6921 (client_id), INDEX IDX_9EB910E4F1E9F66E (operative_system_id), INDEX IDX_9EB910E43DA5256D (image_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE pxe_template (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, template_content LONGTEXT NOT NULL, name VARCHAR(255) NOT NULL, synchronized TINYINT(1) DEFAULT NULL, UNIQUE INDEX UNIQ_73197554D17F50A6 (uuid), UNIQUE INDEX UNIQ_IDENTIFIER_NAME (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE refresh_tokens (id INT AUTO_INCREMENT NOT NULL, refresh_token VARCHAR(128) NOT NULL, username VARCHAR(255) NOT NULL, valid DATETIME NOT NULL, UNIQUE INDEX UNIQ_9BACE7E1C74F2195 (refresh_token), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE remote_calendar (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_BD3BDE0AD17F50A6 (uuid), UNIQUE INDEX UNIQ_IDENTIFIER_NAME (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE remote_calendar_rule (id INT AUTO_INCREMENT NOT NULL, remote_calendar_id INT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, busy_weekdays JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', busy_from_hour TIME DEFAULT NULL, busy_to_hour TIME DEFAULT NULL, is_remote_available TINYINT(1) NOT NULL, available_from_date DATE DEFAULT NULL, available_to_date DATE DEFAULT NULL, available_reason VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_EE93D058D17F50A6 (uuid), INDEX IDX_EE93D058C56641EE (remote_calendar_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE software (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, type VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_77D068CFD17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE software_profile (id INT AUTO_INCREMENT NOT NULL, organizational_unit_id INT NOT NULL, operative_system_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, comments VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_B70C3C9BD17F50A6 (uuid), INDEX IDX_B70C3C9BFB84408A (organizational_unit_id), INDEX IDX_B70C3C9BF1E9F66E (operative_system_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE software_profile_software (software_profile_id INT NOT NULL, software_id INT NOT NULL, INDEX IDX_3DDFEC7ED42A742 (software_profile_id), INDEX IDX_3DDFEC7D7452741 (software_id), PRIMARY KEY(software_profile_id, software_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE subnet (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, netmask VARCHAR(255) NOT NULL, ip_address VARCHAR(255) NOT NULL, next_server VARCHAR(255) NOT NULL, boot_file_name VARCHAR(255) NOT NULL, server_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, synchronized TINYINT(1) DEFAULT NULL, UNIQUE INDEX UNIQ_91C24216D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE trace (id INT AUTO_INCREMENT NOT NULL, client_id INT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, command VARCHAR(255) DEFAULT NULL, status VARCHAR(255) NOT NULL, output VARCHAR(255) DEFAULT NULL, executed_at DATETIME NOT NULL, finished_at DATETIME DEFAULT NULL, job_id VARCHAR(255) DEFAULT NULL, input JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', UNIQUE INDEX UNIQ_315BD5A1D17F50A6 (uuid), INDEX IDX_315BD5A119EB6921 (client_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, username VARCHAR(180) NOT NULL, roles JSON NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_8D93D649D17F50A6 (uuid), UNIQUE INDEX UNIQ_IDENTIFIER_USERNAME (username), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE user_user_group (user_id INT NOT NULL, user_group_id INT NOT NULL, INDEX IDX_28657971A76ED395 (user_id), INDEX IDX_286579711ED93D47 (user_group_id), PRIMARY KEY(user_id, user_group_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE user_organizational_unit (user_id INT NOT NULL, organizational_unit_id INT NOT NULL, INDEX IDX_5E59845FA76ED395 (user_id), INDEX IDX_5E59845FFB84408A (organizational_unit_id), PRIMARY KEY(user_id, organizational_unit_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE user_group (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, permissions JSON NOT NULL COMMENT \'(DC2Type:json)\', name VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, UNIQUE INDEX UNIQ_8F02BF9DD17F50A6 (uuid), UNIQUE INDEX UNIQ_IDENTIFIER_NAME (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE view (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, favourite TINYINT(1) NOT NULL, filters JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_FEFDAB8ED17F50A6 (uuid), INDEX IDX_FEFDAB8EA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455FB84408A FOREIGN KEY (organizational_unit_id) REFERENCES organizational_unit (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455CCD7E912 FOREIGN KEY (menu_id) REFERENCES menu (id)');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455CFA495C1 FOREIGN KEY (hardware_profile_id) REFERENCES hardware_profile (id)');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C74404555DA0FB8 FOREIGN KEY (template_id) REFERENCES pxe_template (id)');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C744045550C9D4F7 FOREIGN KEY (repository_id) REFERENCES image_repository (id)');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455C9CF9478 FOREIGN KEY (subnet_id) REFERENCES subnet (id) ON DELETE SET NULL');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455F7E54CF3 FOREIGN KEY (og_live_id) REFERENCES og_live (id) ON DELETE SET NULL');
|
||||
$this->addSql('ALTER TABLE command_group_command ADD CONSTRAINT FK_118CE215C7B800D6 FOREIGN KEY (command_group_id) REFERENCES command_group (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE command_group_command ADD CONSTRAINT FK_118CE21533E1689A FOREIGN KEY (command_id) REFERENCES command (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE command_task_command ADD CONSTRAINT FK_BB417CA862DC5265 FOREIGN KEY (command_task_id) REFERENCES command_task (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE command_task_command ADD CONSTRAINT FK_BB417CA833E1689A FOREIGN KEY (command_id) REFERENCES command (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE command_task_command_group ADD CONSTRAINT FK_C43618BD62DC5265 FOREIGN KEY (command_task_id) REFERENCES command_task (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE command_task_command_group ADD CONSTRAINT FK_C43618BDC7B800D6 FOREIGN KEY (command_group_id) REFERENCES command_group (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE command_task_client ADD CONSTRAINT FK_F97A827D62DC5265 FOREIGN KEY (command_task_id) REFERENCES command_task (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE command_task_client ADD CONSTRAINT FK_F97A827D19EB6921 FOREIGN KEY (client_id) REFERENCES client (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE hardware ADD CONSTRAINT FK_FE99E9E0C54C8C93 FOREIGN KEY (type_id) REFERENCES hardware_type (id)');
|
||||
$this->addSql('ALTER TABLE hardware_profile ADD CONSTRAINT FK_2D9A2460FB84408A FOREIGN KEY (organizational_unit_id) REFERENCES organizational_unit (id)');
|
||||
$this->addSql('ALTER TABLE hardware_profile_hardware ADD CONSTRAINT FK_18C7E12CFA495C1 FOREIGN KEY (hardware_profile_id) REFERENCES hardware_profile (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE hardware_profile_hardware ADD CONSTRAINT FK_18C7E12C9CC762B FOREIGN KEY (hardware_id) REFERENCES hardware (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE image ADD CONSTRAINT FK_C53D045FED42A742 FOREIGN KEY (software_profile_id) REFERENCES software_profile (id)');
|
||||
$this->addSql('ALTER TABLE image ADD CONSTRAINT FK_C53D045F50C9D4F7 FOREIGN KEY (repository_id) REFERENCES image_repository (id)');
|
||||
$this->addSql('ALTER TABLE image ADD CONSTRAINT FK_C53D045F727ACA70 FOREIGN KEY (parent_id) REFERENCES image (id)');
|
||||
$this->addSql('ALTER TABLE image ADD CONSTRAINT FK_C53D045F19EB6921 FOREIGN KEY (client_id) REFERENCES client (id)');
|
||||
$this->addSql('ALTER TABLE network_settings ADD CONSTRAINT FK_48869B54CCD7E912 FOREIGN KEY (menu_id) REFERENCES menu (id)');
|
||||
$this->addSql('ALTER TABLE network_settings ADD CONSTRAINT FK_48869B54CFA495C1 FOREIGN KEY (hardware_profile_id) REFERENCES hardware_profile (id)');
|
||||
$this->addSql('ALTER TABLE network_settings ADD CONSTRAINT FK_48869B5450C9D4F7 FOREIGN KEY (repository_id) REFERENCES image_repository (id)');
|
||||
$this->addSql('ALTER TABLE network_settings ADD CONSTRAINT FK_48869B54F7E54CF3 FOREIGN KEY (og_live_id) REFERENCES og_live (id)');
|
||||
$this->addSql('ALTER TABLE organizational_unit ADD CONSTRAINT FK_749AEB2D727ACA70 FOREIGN KEY (parent_id) REFERENCES organizational_unit (id) ON DELETE SET NULL');
|
||||
$this->addSql('ALTER TABLE organizational_unit ADD CONSTRAINT FK_749AEB2D9B9A36D0 FOREIGN KEY (network_settings_id) REFERENCES network_settings (id)');
|
||||
$this->addSql('ALTER TABLE organizational_unit ADD CONSTRAINT FK_749AEB2DC9CF9478 FOREIGN KEY (subnet_id) REFERENCES subnet (id)');
|
||||
$this->addSql('ALTER TABLE organizational_unit ADD CONSTRAINT FK_749AEB2DC56641EE FOREIGN KEY (remote_calendar_id) REFERENCES remote_calendar (id)');
|
||||
$this->addSql('ALTER TABLE `partition` ADD CONSTRAINT FK_9EB910E419EB6921 FOREIGN KEY (client_id) REFERENCES client (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE `partition` ADD CONSTRAINT FK_9EB910E4F1E9F66E FOREIGN KEY (operative_system_id) REFERENCES operative_system (id)');
|
||||
$this->addSql('ALTER TABLE `partition` ADD CONSTRAINT FK_9EB910E43DA5256D FOREIGN KEY (image_id) REFERENCES image (id)');
|
||||
$this->addSql('ALTER TABLE remote_calendar_rule ADD CONSTRAINT FK_EE93D058C56641EE FOREIGN KEY (remote_calendar_id) REFERENCES remote_calendar (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE software_profile ADD CONSTRAINT FK_B70C3C9BFB84408A FOREIGN KEY (organizational_unit_id) REFERENCES organizational_unit (id)');
|
||||
$this->addSql('ALTER TABLE software_profile ADD CONSTRAINT FK_B70C3C9BF1E9F66E FOREIGN KEY (operative_system_id) REFERENCES operative_system (id)');
|
||||
$this->addSql('ALTER TABLE software_profile_software ADD CONSTRAINT FK_3DDFEC7ED42A742 FOREIGN KEY (software_profile_id) REFERENCES software_profile (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE software_profile_software ADD CONSTRAINT FK_3DDFEC7D7452741 FOREIGN KEY (software_id) REFERENCES software (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE trace ADD CONSTRAINT FK_315BD5A119EB6921 FOREIGN KEY (client_id) REFERENCES client (id)');
|
||||
$this->addSql('ALTER TABLE user_user_group ADD CONSTRAINT FK_28657971A76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE user_user_group ADD CONSTRAINT FK_286579711ED93D47 FOREIGN KEY (user_group_id) REFERENCES user_group (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE user_organizational_unit ADD CONSTRAINT FK_5E59845FA76ED395 FOREIGN KEY (user_id) REFERENCES user (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE user_organizational_unit ADD CONSTRAINT FK_5E59845FFB84408A FOREIGN KEY (organizational_unit_id) REFERENCES organizational_unit (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE view ADD CONSTRAINT FK_FEFDAB8EA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455FB84408A');
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455CCD7E912');
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455CFA495C1');
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C74404555DA0FB8');
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C744045550C9D4F7');
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455C9CF9478');
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455F7E54CF3');
|
||||
$this->addSql('ALTER TABLE command_group_command DROP FOREIGN KEY FK_118CE215C7B800D6');
|
||||
$this->addSql('ALTER TABLE command_group_command DROP FOREIGN KEY FK_118CE21533E1689A');
|
||||
$this->addSql('ALTER TABLE command_task_command DROP FOREIGN KEY FK_BB417CA862DC5265');
|
||||
$this->addSql('ALTER TABLE command_task_command DROP FOREIGN KEY FK_BB417CA833E1689A');
|
||||
$this->addSql('ALTER TABLE command_task_command_group DROP FOREIGN KEY FK_C43618BD62DC5265');
|
||||
$this->addSql('ALTER TABLE command_task_command_group DROP FOREIGN KEY FK_C43618BDC7B800D6');
|
||||
$this->addSql('ALTER TABLE command_task_client DROP FOREIGN KEY FK_F97A827D62DC5265');
|
||||
$this->addSql('ALTER TABLE command_task_client DROP FOREIGN KEY FK_F97A827D19EB6921');
|
||||
$this->addSql('ALTER TABLE hardware DROP FOREIGN KEY FK_FE99E9E0C54C8C93');
|
||||
$this->addSql('ALTER TABLE hardware_profile DROP FOREIGN KEY FK_2D9A2460FB84408A');
|
||||
$this->addSql('ALTER TABLE hardware_profile_hardware DROP FOREIGN KEY FK_18C7E12CFA495C1');
|
||||
$this->addSql('ALTER TABLE hardware_profile_hardware DROP FOREIGN KEY FK_18C7E12C9CC762B');
|
||||
$this->addSql('ALTER TABLE image DROP FOREIGN KEY FK_C53D045FED42A742');
|
||||
$this->addSql('ALTER TABLE image DROP FOREIGN KEY FK_C53D045F50C9D4F7');
|
||||
$this->addSql('ALTER TABLE image DROP FOREIGN KEY FK_C53D045F727ACA70');
|
||||
$this->addSql('ALTER TABLE image DROP FOREIGN KEY FK_C53D045F19EB6921');
|
||||
$this->addSql('ALTER TABLE network_settings DROP FOREIGN KEY FK_48869B54CCD7E912');
|
||||
$this->addSql('ALTER TABLE network_settings DROP FOREIGN KEY FK_48869B54CFA495C1');
|
||||
$this->addSql('ALTER TABLE network_settings DROP FOREIGN KEY FK_48869B5450C9D4F7');
|
||||
$this->addSql('ALTER TABLE network_settings DROP FOREIGN KEY FK_48869B54F7E54CF3');
|
||||
$this->addSql('ALTER TABLE organizational_unit DROP FOREIGN KEY FK_749AEB2D727ACA70');
|
||||
$this->addSql('ALTER TABLE organizational_unit DROP FOREIGN KEY FK_749AEB2D9B9A36D0');
|
||||
$this->addSql('ALTER TABLE organizational_unit DROP FOREIGN KEY FK_749AEB2DC9CF9478');
|
||||
$this->addSql('ALTER TABLE organizational_unit DROP FOREIGN KEY FK_749AEB2DC56641EE');
|
||||
$this->addSql('ALTER TABLE `partition` DROP FOREIGN KEY FK_9EB910E419EB6921');
|
||||
$this->addSql('ALTER TABLE `partition` DROP FOREIGN KEY FK_9EB910E4F1E9F66E');
|
||||
$this->addSql('ALTER TABLE `partition` DROP FOREIGN KEY FK_9EB910E43DA5256D');
|
||||
$this->addSql('ALTER TABLE remote_calendar_rule DROP FOREIGN KEY FK_EE93D058C56641EE');
|
||||
$this->addSql('ALTER TABLE software_profile DROP FOREIGN KEY FK_B70C3C9BFB84408A');
|
||||
$this->addSql('ALTER TABLE software_profile DROP FOREIGN KEY FK_B70C3C9BF1E9F66E');
|
||||
$this->addSql('ALTER TABLE software_profile_software DROP FOREIGN KEY FK_3DDFEC7ED42A742');
|
||||
$this->addSql('ALTER TABLE software_profile_software DROP FOREIGN KEY FK_3DDFEC7D7452741');
|
||||
$this->addSql('ALTER TABLE trace DROP FOREIGN KEY FK_315BD5A119EB6921');
|
||||
$this->addSql('ALTER TABLE user_user_group DROP FOREIGN KEY FK_28657971A76ED395');
|
||||
$this->addSql('ALTER TABLE user_user_group DROP FOREIGN KEY FK_286579711ED93D47');
|
||||
$this->addSql('ALTER TABLE user_organizational_unit DROP FOREIGN KEY FK_5E59845FA76ED395');
|
||||
$this->addSql('ALTER TABLE user_organizational_unit DROP FOREIGN KEY FK_5E59845FFB84408A');
|
||||
$this->addSql('ALTER TABLE view DROP FOREIGN KEY FK_FEFDAB8EA76ED395');
|
||||
$this->addSql('DROP TABLE client');
|
||||
$this->addSql('DROP TABLE command');
|
||||
$this->addSql('DROP TABLE command_group');
|
||||
$this->addSql('DROP TABLE command_group_command');
|
||||
$this->addSql('DROP TABLE command_task');
|
||||
$this->addSql('DROP TABLE command_task_command');
|
||||
$this->addSql('DROP TABLE command_task_command_group');
|
||||
$this->addSql('DROP TABLE command_task_client');
|
||||
$this->addSql('DROP TABLE hardware');
|
||||
$this->addSql('DROP TABLE hardware_profile');
|
||||
$this->addSql('DROP TABLE hardware_profile_hardware');
|
||||
$this->addSql('DROP TABLE hardware_type');
|
||||
$this->addSql('DROP TABLE image');
|
||||
$this->addSql('DROP TABLE image_repository');
|
||||
$this->addSql('DROP TABLE menu');
|
||||
$this->addSql('DROP TABLE network_settings');
|
||||
$this->addSql('DROP TABLE og_live');
|
||||
$this->addSql('DROP TABLE operative_system');
|
||||
$this->addSql('DROP TABLE operative_system_type');
|
||||
$this->addSql('DROP TABLE organizational_unit');
|
||||
$this->addSql('DROP TABLE `partition`');
|
||||
$this->addSql('DROP TABLE pxe_template');
|
||||
$this->addSql('DROP TABLE refresh_tokens');
|
||||
$this->addSql('DROP TABLE remote_calendar');
|
||||
$this->addSql('DROP TABLE remote_calendar_rule');
|
||||
$this->addSql('DROP TABLE software');
|
||||
$this->addSql('DROP TABLE software_profile');
|
||||
$this->addSql('DROP TABLE software_profile_software');
|
||||
$this->addSql('DROP TABLE subnet');
|
||||
$this->addSql('DROP TABLE trace');
|
||||
$this->addSql('DROP TABLE user');
|
||||
$this->addSql('DROP TABLE user_user_group');
|
||||
$this->addSql('DROP TABLE user_organizational_unit');
|
||||
$this->addSql('DROP TABLE user_group');
|
||||
$this->addSql('DROP TABLE view');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241121135118 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE subnet CHANGE next_server next_server VARCHAR(255) DEFAULT NULL, CHANGE boot_file_name boot_file_name VARCHAR(255) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE subnet CHANGE next_server next_server VARCHAR(255) NOT NULL, CHANGE boot_file_name boot_file_name VARCHAR(255) NOT NULL');
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240619084701 extends AbstractMigration
|
||||
final class Version20241205110301 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
|
@ -20,12 +20,12 @@ final class Version20240619084701 extends AbstractMigration
|
|||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE client ADD validation TINYINT(1) DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE subnet ADD router VARCHAR(255) DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE client DROP validation');
|
||||
$this->addSql('ALTER TABLE subnet DROP router');
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240621085144 extends AbstractMigration
|
||||
final class Version20241211074943 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
|
@ -20,14 +20,14 @@ final class Version20240621085144 extends AbstractMigration
|
|||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP INDEX UNIQ_IDENTIFIER_NAME ON organizational_unit');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_NAME ON organizational_unit (name, parent_id)');
|
||||
$this->addSql('DROP INDEX UNIQ_IDENTIFIER_NAME ON og_live');
|
||||
$this->addSql('ALTER TABLE og_live DROP name');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP INDEX UNIQ_IDENTIFIER_NAME ON organizational_unit');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_NAME ON organizational_unit (name)');
|
||||
$this->addSql('ALTER TABLE og_live ADD name VARCHAR(255) NOT NULL');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_NAME ON og_live (name)');
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240620095914 extends AbstractMigration
|
||||
final class Version20241211075520 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
|
@ -20,14 +20,14 @@ final class Version20240620095914 extends AbstractMigration
|
|||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE `partition` DROP FOREIGN KEY FK_9EB910E419EB6921');
|
||||
$this->addSql('ALTER TABLE `partition` ADD CONSTRAINT FK_9EB910E419EB6921 FOREIGN KEY (client_id) REFERENCES client (id) ON DELETE SET NULL');
|
||||
$this->addSql('ALTER TABLE network_settings DROP FOREIGN KEY FK_48869B54F7E54CF3');
|
||||
$this->addSql('ALTER TABLE network_settings ADD CONSTRAINT FK_48869B54F7E54CF3 FOREIGN KEY (og_live_id) REFERENCES og_live (id) ON DELETE SET NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE `partition` DROP FOREIGN KEY FK_9EB910E419EB6921');
|
||||
$this->addSql('ALTER TABLE `partition` ADD CONSTRAINT FK_9EB910E419EB6921 FOREIGN KEY (client_id) REFERENCES client (id)');
|
||||
$this->addSql('ALTER TABLE network_settings DROP FOREIGN KEY FK_48869B54F7E54CF3');
|
||||
$this->addSql('ALTER TABLE network_settings ADD CONSTRAINT FK_48869B54F7E54CF3 FOREIGN KEY (og_live_id) REFERENCES og_live (id)');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20241211080733 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE og_live CHANGE filename filename VARCHAR(255) NOT NULL');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_FILENAME ON og_live (filename)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP INDEX UNIQ_IDENTIFIER_FILENAME ON og_live');
|
||||
$this->addSql('ALTER TABLE og_live CHANGE filename filename VARCHAR(255) DEFAULT NULL');
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240718064611 extends AbstractMigration
|
||||
final class Version20241216080914 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
|
@ -20,12 +20,12 @@ final class Version20240718064611 extends AbstractMigration
|
|||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE client ADD position JSON DEFAULT NULL COMMENT \'(DC2Type:json)\'');
|
||||
$this->addSql('ALTER TABLE menu DROP title');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE client DROP position');
|
||||
$this->addSql('ALTER TABLE menu ADD title VARCHAR(255) NOT NULL');
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240618113629 extends AbstractMigration
|
||||
final class Version20250107121226 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
|
@ -20,12 +20,12 @@ final class Version20240618113629 extends AbstractMigration
|
|||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_NAME ON organizational_unit (name)');
|
||||
$this->addSql('ALTER TABLE menu ADD is_default TINYINT(1) NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP INDEX UNIQ_IDENTIFIER_NAME ON organizational_unit');
|
||||
$this->addSql('ALTER TABLE menu DROP is_default');
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240701123613 extends AbstractMigration
|
||||
final class Version20250107124654 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
|
@ -20,14 +20,14 @@ final class Version20240701123613 extends AbstractMigration
|
|||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455FB84408A');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455FB84408A FOREIGN KEY (organizational_unit_id) REFERENCES organizational_unit (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455CCD7E912');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455CCD7E912 FOREIGN KEY (menu_id) REFERENCES menu (id) ON DELETE SET NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455FB84408A');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455FB84408A FOREIGN KEY (organizational_unit_id) REFERENCES organizational_unit (id)');
|
||||
$this->addSql('ALTER TABLE client DROP FOREIGN KEY FK_C7440455CCD7E912');
|
||||
$this->addSql('ALTER TABLE client ADD CONSTRAINT FK_C7440455CCD7E912 FOREIGN KEY (menu_id) REFERENCES menu (id)');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20250203113932 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE image ADD is_global TINYINT(1) NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE image DROP is_global');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20250206075246 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE image_image_repository (image_id INT NOT NULL, image_repository_id INT NOT NULL, INDEX IDX_B78513373DA5256D (image_id), INDEX IDX_B785133714C736FC (image_repository_id), PRIMARY KEY(image_id, image_repository_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE image_image_repository ADD CONSTRAINT FK_B78513373DA5256D FOREIGN KEY (image_id) REFERENCES image (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE image_image_repository ADD CONSTRAINT FK_B785133714C736FC FOREIGN KEY (image_repository_id) REFERENCES image_repository (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE image DROP FOREIGN KEY FK_C53D045F50C9D4F7');
|
||||
$this->addSql('DROP INDEX IDX_C53D045F50C9D4F7 ON image');
|
||||
$this->addSql('ALTER TABLE image DROP repository_id');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE image_image_repository DROP FOREIGN KEY FK_B78513373DA5256D');
|
||||
$this->addSql('ALTER TABLE image_image_repository DROP FOREIGN KEY FK_B785133714C736FC');
|
||||
$this->addSql('DROP TABLE image_image_repository');
|
||||
$this->addSql('ALTER TABLE image ADD repository_id INT NOT NULL');
|
||||
$this->addSql('ALTER TABLE image ADD CONSTRAINT FK_C53D045F50C9D4F7 FOREIGN KEY (repository_id) REFERENCES image_repository (id)');
|
||||
$this->addSql('CREATE INDEX IDX_C53D045F50C9D4F7 ON image (repository_id)');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20250211073126 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE image_image_repository DROP FOREIGN KEY FK_B785133714C736FC');
|
||||
$this->addSql('ALTER TABLE image_image_repository DROP FOREIGN KEY FK_B78513373DA5256D');
|
||||
$this->addSql('DROP TABLE image_image_repository');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE image_image_repository (image_id INT NOT NULL, image_repository_id INT NOT NULL, INDEX IDX_B78513373DA5256D (image_id), INDEX IDX_B785133714C736FC (image_repository_id), PRIMARY KEY(image_id, image_repository_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
|
||||
$this->addSql('ALTER TABLE image_image_repository ADD CONSTRAINT FK_B785133714C736FC FOREIGN KEY (image_repository_id) REFERENCES image_repository (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE image_image_repository ADD CONSTRAINT FK_B78513373DA5256D FOREIGN KEY (image_id) REFERENCES image (id) ON DELETE CASCADE');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20250211073801 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE image_image_repository (id INT AUTO_INCREMENT NOT NULL, image_id INT DEFAULT NULL, repository_id INT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, status VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_B7851337D17F50A6 (uuid), INDEX IDX_B78513373DA5256D (image_id), INDEX IDX_B785133750C9D4F7 (repository_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE image_image_repository ADD CONSTRAINT FK_B78513373DA5256D FOREIGN KEY (image_id) REFERENCES image (id)');
|
||||
$this->addSql('ALTER TABLE image_image_repository ADD CONSTRAINT FK_B785133750C9D4F7 FOREIGN KEY (repository_id) REFERENCES image_repository (id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE image_image_repository DROP FOREIGN KEY FK_B78513373DA5256D');
|
||||
$this->addSql('ALTER TABLE image_image_repository DROP FOREIGN KEY FK_B785133750C9D4F7');
|
||||
$this->addSql('DROP TABLE image_image_repository');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20250211081319 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE image_image_repository DROP FOREIGN KEY FK_B785133750C9D4F7');
|
||||
$this->addSql('ALTER TABLE image_image_repository ADD CONSTRAINT FK_B785133750C9D4F7 FOREIGN KEY (repository_id) REFERENCES image_image_repository (id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE image_image_repository DROP FOREIGN KEY FK_B785133750C9D4F7');
|
||||
$this->addSql('ALTER TABLE image_image_repository ADD CONSTRAINT FK_B785133750C9D4F7 FOREIGN KEY (repository_id) REFERENCES image_repository (id)');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20250211081406 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE image_image_repository DROP FOREIGN KEY FK_B785133750C9D4F7');
|
||||
$this->addSql('ALTER TABLE image_image_repository ADD CONSTRAINT FK_B785133750C9D4F7 FOREIGN KEY (repository_id) REFERENCES image_repository (id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE image_image_repository DROP FOREIGN KEY FK_B785133750C9D4F7');
|
||||
$this->addSql('ALTER TABLE image_image_repository ADD CONSTRAINT FK_B785133750C9D4F7 FOREIGN KEY (repository_id) REFERENCES image_image_repository (id)');
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240619083230 extends AbstractMigration
|
||||
final class Version20250211103630 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
|
@ -20,14 +20,12 @@ final class Version20240619083230 extends AbstractMigration
|
|||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_IP ON client (ip)');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_MAC ON client (mac)');
|
||||
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_IMAGE_REPOSITORY ON image_image_repository (image_id, repository_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('DROP INDEX UNIQ_IDENTIFIER_IP ON client');
|
||||
$this->addSql('DROP INDEX UNIQ_IDENTIFIER_MAC ON client');
|
||||
$this->addSql('DROP INDEX UNIQ_IDENTIFIER_IMAGE_REPOSITORY ON image_image_repository');
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue