2024-07-12 09:41:44 +00:00
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2021-04-22 11:25
from __future__ import unicode_literals
2015-03-04 21:06:16 +00:00
2023-07-25 14:59:58 +00:00
from django . conf import settings
from django . db import migrations , models
2021-04-22 12:18:01 +00:00
import django . db . models . deletion
2015-04-29 13:55:22 +00:00
import jsonfield . fields
2023-07-25 14:59:58 +00:00
import orchestra . core . validators
2015-03-04 21:06:16 +00:00
class Migration ( migrations . Migration ) :
2023-07-25 14:59:58 +00:00
2015-03-04 21:06:16 +00:00
dependencies = [
migrations . swappable_dependency ( settings . AUTH_USER_MODEL ) ,
2024-07-12 09:41:44 +00:00
( ' orchestration ' , ' __first__ ' ) ,
2015-03-04 21:06:16 +00:00
]
operations = [
migrations . CreateModel (
name = ' WebApp ' ,
fields = [
2023-07-25 14:59:58 +00:00
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' name ' , models . CharField ( help_text = ' The app will be installed in %(home)s /webapps/ %(app_name)s ' , max_length = 128 , validators = [ orchestra . core . validators . validate_name ] , verbose_name = ' name ' ) ) ,
2024-07-12 09:41:44 +00:00
( ' type ' , models . CharField ( choices = [ ( ' php ' , ' PHP ' ) , ( ' python ' , ' Python ' ) , ( ' static ' , ' Static ' ) , ( ' symbolic-link ' , ' Symbolic link ' ) , ( ' webalizer ' , ' Webalizer ' ) , ( ' wordpress-php ' , ' WordPress ' ) ] , max_length = 32 , verbose_name = ' type ' ) ) ,
2023-07-25 14:59:58 +00:00
( ' data ' , jsonfield . fields . JSONField ( blank = True , default = { } , help_text = ' Extra information dependent of each service. ' , verbose_name = ' data ' ) ) ,
( ' account ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , related_name = ' webapps ' , to = settings . AUTH_USER_MODEL , verbose_name = ' Account ' ) ) ,
2015-03-04 21:06:16 +00:00
] ,
options = {
2015-04-08 14:41:09 +00:00
' verbose_name ' : ' Web App ' ,
2015-04-29 13:55:22 +00:00
' verbose_name_plural ' : ' Web Apps ' ,
2015-03-04 21:06:16 +00:00
} ,
) ,
migrations . CreateModel (
name = ' WebAppOption ' ,
fields = [
2023-07-25 14:59:58 +00:00
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
2024-07-12 09:41:44 +00:00
( ' name ' , models . CharField ( choices = [ ( None , ' ------- ' ) , ( ' FileSystem ' , [ ( ' public-root ' , ' Public root ' ) ] ) , ( ' Process ' , [ ( ' timeout ' , ' Process timeout ' ) , ( ' processes ' , ' Number of processes ' ) ] ) , ( ' PHP ' , [ ( ' enable_functions ' , ' Enable functions ' ) , ( ' allow_url_include ' , ' Allow URL include ' ) , ( ' allow_url_fopen ' , ' Allow URL fopen ' ) , ( ' auto_append_file ' , ' Auto append file ' ) , ( ' auto_prepend_file ' , ' Auto prepend file ' ) , ( ' date.timezone ' , ' date.timezone ' ) , ( ' default_socket_timeout ' , ' Default socket timeout ' ) , ( ' display_errors ' , ' Display errors ' ) , ( ' extension ' , ' Extension ' ) , ( ' magic_quotes_gpc ' , ' Magic quotes GPC ' ) , ( ' magic_quotes_runtime ' , ' Magic quotes runtime ' ) , ( ' magic_quotes_sybase ' , ' Magic quotes sybase ' ) , ( ' max_input_time ' , ' Max input time ' ) , ( ' max_input_vars ' , ' Max input vars ' ) , ( ' memory_limit ' , ' Memory limit ' ) , ( ' mysql.connect_timeout ' , ' Mysql connect timeout ' ) , ( ' output_buffering ' , ' Output buffering ' ) , ( ' register_globals ' , ' Register globals ' ) , ( ' post_max_size ' , ' Post max size ' ) , ( ' sendmail_path ' , ' Sendmail path ' ) , ( ' session.bug_compat_warn ' , ' Session bug compat warning ' ) , ( ' session.auto_start ' , ' Session auto start ' ) , ( ' safe_mode ' , ' Safe mode ' ) , ( ' suhosin.post.max_vars ' , ' Suhosin POST max vars ' ) , ( ' suhosin.get.max_vars ' , ' Suhosin GET max vars ' ) , ( ' suhosin.request.max_vars ' , ' Suhosin request max vars ' ) , ( ' suhosin.session.encrypt ' , ' Suhosin session encrypt ' ) , ( ' suhosin.simulation ' , ' Suhosin simulation ' ) , ( ' suhosin.executor.include.whitelist ' , ' Suhosin executor include whitelist ' ) , ( ' upload_max_filesize ' , ' Upload max filesize ' ) , ( ' zend_extension ' , ' Zend extension ' ) ] ) ] , max_length = 128 , verbose_name = ' name ' ) ) ,
2023-07-25 14:59:58 +00:00
( ' value ' , models . CharField ( max_length = 256 , verbose_name = ' value ' ) ) ,
( ' webapp ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , related_name = ' options ' , to = ' webapps.WebApp ' , verbose_name = ' Web application ' ) ) ,
2015-03-04 21:06:16 +00:00
] ,
options = {
2015-04-08 14:41:09 +00:00
' verbose_name ' : ' option ' ,
2015-04-29 13:55:22 +00:00
' verbose_name_plural ' : ' options ' ,
2015-03-04 21:06:16 +00:00
} ,
) ,
2024-07-12 09:41:44 +00:00
migrations . AlterUniqueTogether (
name = ' webappoption ' ,
unique_together = set ( [ ( ' webapp ' , ' name ' ) ] ) ,
) ,
migrations . AlterField (
model_name = ' webapp ' ,
name = ' type ' ,
field = models . CharField ( choices = [ ( ' moodle-php ' , ' Moodle ' ) , ( ' php ' , ' PHP ' ) , ( ' python ' , ' Python ' ) , ( ' static ' , ' Static ' ) , ( ' symbolic-link ' , ' Symbolic link ' ) , ( ' webalizer ' , ' Webalizer ' ) , ( ' wordpress-php ' , ' WordPress ' ) ] , max_length = 32 , verbose_name = ' type ' ) ,
) ,
migrations . AddField (
model_name = ' webapp ' ,
name = ' target_server ' ,
field = models . ForeignKey ( default = 1 , on_delete = django . db . models . deletion . CASCADE , related_name = ' webapps ' , to = ' orchestration.Server ' , verbose_name = ' Target Server ' ) ,
preserve_default = False ,
) ,
migrations . AddField (
model_name = ' webapp ' ,
name = ' comments ' ,
field = models . TextField ( blank = True , default = ' ' ) ,
) ,
migrations . AlterUniqueTogether (
name = ' webapp ' ,
unique_together = set ( [ ( ' name ' , ' account ' ) ] ) ,
) ,
migrations . AlterField (
model_name = ' webappoption ' ,
name = ' name ' ,
field = models . CharField ( choices = [ ( None , ' ------- ' ) , ( ' FileSystem ' , [ ( ' public-root ' , ' Public root ' ) ] ) , ( ' Process ' , [ ( ' timeout ' , ' Process timeout ' ) , ( ' processes ' , ' Number of processes ' ) ] ) , ( ' PHP ' , [ ( ' enable_functions ' , ' Enable functions ' ) , ( ' disable_functions ' , ' Disable functions ' ) , ( ' allow_url_include ' , ' Allow URL include ' ) , ( ' allow_url_fopen ' , ' Allow URL fopen ' ) , ( ' auto_append_file ' , ' Auto append file ' ) , ( ' auto_prepend_file ' , ' Auto prepend file ' ) , ( ' date.timezone ' , ' date.timezone ' ) , ( ' default_socket_timeout ' , ' Default socket timeout ' ) , ( ' display_errors ' , ' Display errors ' ) , ( ' extension ' , ' Extension ' ) , ( ' include_path ' , ' Include path ' ) , ( ' magic_quotes_gpc ' , ' Magic quotes GPC ' ) , ( ' magic_quotes_runtime ' , ' Magic quotes runtime ' ) , ( ' magic_quotes_sybase ' , ' Magic quotes sybase ' ) , ( ' max_input_time ' , ' Max input time ' ) , ( ' max_input_vars ' , ' Max input vars ' ) , ( ' memory_limit ' , ' Memory limit ' ) , ( ' mysql.connect_timeout ' , ' Mysql connect timeout ' ) , ( ' output_buffering ' , ' Output buffering ' ) , ( ' register_globals ' , ' Register globals ' ) , ( ' post_max_size ' , ' Post max size ' ) , ( ' sendmail_path ' , ' Sendmail path ' ) , ( ' session.bug_compat_warn ' , ' Session bug compat warning ' ) , ( ' session.auto_start ' , ' Session auto start ' ) , ( ' safe_mode ' , ' Safe mode ' ) , ( ' suhosin.post.max_vars ' , ' Suhosin POST max vars ' ) , ( ' suhosin.get.max_vars ' , ' Suhosin GET max vars ' ) , ( ' suhosin.request.max_vars ' , ' Suhosin request max vars ' ) , ( ' suhosin.session.encrypt ' , ' Suhosin session encrypt ' ) , ( ' suhosin.simulation ' , ' Suhosin simulation ' ) , ( ' suhosin.executor.include.whitelist ' , ' Suhosin executor include whitelist ' ) , ( ' upload_max_filesize ' , ' Upload max filesize ' ) , ( ' upload_tmp_dir ' , ' Upload tmp dir ' ) , ( ' zend_extension ' , ' Zend extension ' ) ] ) ] , max_length = 128 , verbose_name = ' name ' ) ,
) ,
2015-03-04 21:06:16 +00:00
]