Coverage for apis_core/apis_vocabularies/migrations/0001_initial.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.6.4, created at 2024-11-22 07:51 +0000

1# Generated by Django 3.1.14 on 2022-02-01 12:41 

2 

3import django.db.models.deletion 

4from django.conf import settings 

5from django.db import migrations, models 

6 

7 

8class Migration(migrations.Migration): 

9 initial = True 

10 

11 dependencies = [ 

12 migrations.swappable_dependency(settings.AUTH_USER_MODEL), 

13 ("apis_metainfo", "0001_initial"), 

14 ] 

15 

16 operations = [ 

17 migrations.CreateModel( 

18 name="VocabNames", 

19 fields=[ 

20 ( 

21 "id", 

22 models.AutoField( 

23 auto_created=True, 

24 primary_key=True, 

25 serialize=False, 

26 verbose_name="ID", 

27 ), 

28 ), 

29 ("name", models.CharField(max_length=255)), 

30 ], 

31 ), 

32 migrations.CreateModel( 

33 name="VocabsBaseClass", 

34 fields=[ 

35 ( 

36 "rootobject_ptr", 

37 models.OneToOneField( 

38 auto_created=True, 

39 on_delete=django.db.models.deletion.CASCADE, 

40 parent_link=True, 

41 primary_key=True, 

42 serialize=False, 

43 to="apis_metainfo.rootobject", 

44 ), 

45 ), 

46 ( 

47 "description", 

48 models.TextField( 

49 blank=True, help_text="Brief description of the used term." 

50 ), 

51 ), 

52 ( 

53 "status", 

54 models.CharField( 

55 choices=[ 

56 ("rej", "rejected"), 

57 ("ac", "accepted"), 

58 ("can", "candidate"), 

59 ("del", "deleted"), 

60 ], 

61 default="can", 

62 max_length=4, 

63 ), 

64 ), 

65 ( 

66 "parent_class", 

67 models.ForeignKey( 

68 blank=True, 

69 null=True, 

70 on_delete=django.db.models.deletion.CASCADE, 

71 to="apis_vocabularies.vocabsbaseclass", 

72 ), 

73 ), 

74 ( 

75 "userAdded", 

76 models.ForeignKey( 

77 blank=True, 

78 null=True, 

79 on_delete=django.db.models.deletion.SET_NULL, 

80 to=settings.AUTH_USER_MODEL, 

81 ), 

82 ), 

83 ( 

84 "vocab_name", 

85 models.ForeignKey( 

86 blank=True, 

87 null=True, 

88 on_delete=django.db.models.deletion.SET_NULL, 

89 to="apis_vocabularies.vocabnames", 

90 ), 

91 ), 

92 ], 

93 bases=("apis_metainfo.rootobject",), 

94 ), 

95 migrations.CreateModel( 

96 name="CollectionType", 

97 fields=[ 

98 ( 

99 "vocabsbaseclass_ptr", 

100 models.OneToOneField( 

101 auto_created=True, 

102 on_delete=django.db.models.deletion.CASCADE, 

103 parent_link=True, 

104 primary_key=True, 

105 serialize=False, 

106 to="apis_vocabularies.vocabsbaseclass", 

107 ), 

108 ), 

109 ], 

110 bases=("apis_vocabularies.vocabsbaseclass",), 

111 ), 

112 migrations.CreateModel( 

113 name="LabelType", 

114 fields=[ 

115 ( 

116 "vocabsbaseclass_ptr", 

117 models.OneToOneField( 

118 auto_created=True, 

119 on_delete=django.db.models.deletion.CASCADE, 

120 parent_link=True, 

121 primary_key=True, 

122 serialize=False, 

123 to="apis_vocabularies.vocabsbaseclass", 

124 ), 

125 ), 

126 ], 

127 bases=("apis_vocabularies.vocabsbaseclass",), 

128 ), 

129 migrations.CreateModel( 

130 name="VocabsUri", 

131 fields=[ 

132 ( 

133 "id", 

134 models.AutoField( 

135 auto_created=True, 

136 primary_key=True, 

137 serialize=False, 

138 verbose_name="ID", 

139 ), 

140 ), 

141 ("uri", models.URLField()), 

142 ("domain", models.CharField(blank=True, max_length=255)), 

143 ("rdf_link", models.URLField(blank=True)), 

144 ("loaded", models.BooleanField(default=False)), 

145 ("loaded_time", models.DateTimeField(blank=True, null=True)), 

146 ( 

147 "vocab", 

148 models.ForeignKey( 

149 blank=True, 

150 null=True, 

151 on_delete=django.db.models.deletion.CASCADE, 

152 to="apis_vocabularies.vocabsbaseclass", 

153 ), 

154 ), 

155 ], 

156 ), 

157 migrations.CreateModel( 

158 name="TextType", 

159 fields=[ 

160 ( 

161 "vocabsbaseclass_ptr", 

162 models.OneToOneField( 

163 auto_created=True, 

164 on_delete=django.db.models.deletion.CASCADE, 

165 parent_link=True, 

166 primary_key=True, 

167 serialize=False, 

168 to="apis_vocabularies.vocabsbaseclass", 

169 ), 

170 ), 

171 ("entity", models.CharField(max_length=255)), 

172 ( 

173 "lang", 

174 models.CharField( 

175 blank=True, 

176 default="deu", 

177 help_text="The ISO 639-3 (or 2) code for the label's language.", 

178 max_length=3, 

179 null=True, 

180 verbose_name="ISO Code", 

181 ), 

182 ), 

183 ], 

184 bases=("apis_vocabularies.vocabsbaseclass",), 

185 ), 

186 ]