aboa 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
aboa/__init__.py ADDED
@@ -0,0 +1,4 @@
1
+ """
2
+ Archive for Business Operations Analysis.
3
+ """
4
+
@@ -0,0 +1,8 @@
1
+ <archive_configurations root_directory="/tmp/aboa_archive">
2
+ <archive_configuration file_group="default">
3
+ <file_mask>*</file_mask>
4
+ <file_directory>default</file_directory>
5
+ <file_processor></file_processor>
6
+ </archive_configuration>
7
+ </archive_configurations>
8
+
@@ -0,0 +1,12 @@
1
+ {
2
+ "DDBB_CONFIGURATION": {
3
+ "user": "aboa",
4
+ "host": "localhost",
5
+ "port": 5432,
6
+ "database": "aboadb",
7
+ "db_api": "postgresql",
8
+ "pool_size": 100,
9
+ "max_overflow": 100
10
+ }
11
+ }
12
+
@@ -0,0 +1,10 @@
1
+ {
2
+ "LOG": {
3
+ "LEVEL": "INFO",
4
+ "MAX_BYTES": 50000000,
5
+ "MAX_BACKUP": 30
6
+ },
7
+ "ARCHIVE": {
8
+ "FINAL_REMOVAL_DELAY_DAYS": 30
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,365 @@
1
+ -- ** Database generated with pgModeler (PostgreSQL Database Modeler).
2
+ -- ** pgModeler version: 1.2.3
3
+ -- ** PostgreSQL version: 18.0
4
+ -- ** Project Site: pgmodeler.io
5
+ -- ** Model Author: ---
6
+ -- object: aboa | type: ROLE --
7
+ -- DROP ROLE IF EXISTS aboa;
8
+ CREATE ROLE aboa WITH
9
+ INHERIT
10
+ LOGIN;
11
+ -- ddl-end --
12
+
13
+
14
+ -- ** Database creation must be performed outside a multi lined SQL file.
15
+ -- ** These commands were put in this file only as a convenience.
16
+
17
+ -- object: aboadb | type: DATABASE --
18
+ -- DROP DATABASE IF EXISTS aboadb;
19
+ CREATE DATABASE aboadb;
20
+ -- ddl-end --
21
+
22
+
23
+ -- object: aboa | type: SCHEMA --
24
+ -- DROP SCHEMA IF EXISTS aboa CASCADE;
25
+ CREATE SCHEMA aboa;
26
+ -- ddl-end --
27
+ ALTER SCHEMA aboa OWNER TO aboa;
28
+ -- ddl-end --
29
+
30
+ SET search_path TO pg_catalog,public,aboa;
31
+ -- ddl-end --
32
+
33
+ -- object: aboa.archive_root_directories | type: TABLE --
34
+ -- DROP TABLE IF EXISTS aboa.archive_root_directories CASCADE;
35
+ CREATE TABLE aboa.archive_root_directories (
36
+ root_directory_uuid uuid NOT NULL,
37
+ path text NOT NULL,
38
+ active_from timestamp NOT NULL,
39
+ active_until timestamp,
40
+ active bool NOT NULL,
41
+ CONSTRAINT archive_root_directories_pk PRIMARY KEY (root_directory_uuid)
42
+ );
43
+ -- ddl-end --
44
+ ALTER TABLE aboa.archive_root_directories OWNER TO aboa;
45
+ -- ddl-end --
46
+
47
+ -- object: aboa.archive_configurations | type: TABLE --
48
+ -- DROP TABLE IF EXISTS aboa.archive_configurations CASCADE;
49
+ CREATE TABLE aboa.archive_configurations (
50
+ archive_configuration_uuid uuid NOT NULL,
51
+ path text NOT NULL,
52
+ active_from timestamp NOT NULL,
53
+ active_until timestamp,
54
+ active bool NOT NULL,
55
+ content text NOT NULL,
56
+ CONSTRAINT archive_configurations_pk PRIMARY KEY (archive_configuration_uuid)
57
+ );
58
+ -- ddl-end --
59
+ ALTER TABLE aboa.archive_configurations OWNER TO aboa;
60
+ -- ddl-end --
61
+
62
+ -- object: aboa.archived_files | type: TABLE --
63
+ -- DROP TABLE IF EXISTS aboa.archived_files CASCADE;
64
+ CREATE TABLE aboa.archived_files (
65
+ file_uuid uuid NOT NULL,
66
+ name text NOT NULL,
67
+ path text NOT NULL,
68
+ reception_date timestamp NOT NULL,
69
+ archive_date timestamp NOT NULL,
70
+ file_size bigint NOT NULL,
71
+ available bool NOT NULL,
72
+ physically_available bool NOT NULL,
73
+ last_access_date timestamp,
74
+ file_group text,
75
+ file_type text,
76
+ file_class text,
77
+ file_version text,
78
+ validity_start_date timestamp,
79
+ validity_stop_date timestamp,
80
+ generation_date timestamp,
81
+ expiration_date timestamp,
82
+ removal_date timestamp,
83
+ removal_justification text,
84
+ checksum text,
85
+ archive_configuration_uuid uuid,
86
+ delete_archive_configuration_uuid uuid,
87
+ root_directory_uuid uuid NOT NULL,
88
+ archive_configuration_uuid1 uuid,
89
+ delete_archive_configuration_uuid1 uuid,
90
+ CONSTRAINT archived_files_pk PRIMARY KEY (file_uuid)
91
+ );
92
+ -- ddl-end --
93
+ ALTER TABLE aboa.archived_files OWNER TO aboa;
94
+ -- ddl-end --
95
+
96
+ -- object: archive_root_directories_fk | type: CONSTRAINT --
97
+ -- ALTER TABLE aboa.archived_files DROP CONSTRAINT IF EXISTS archive_root_directories_fk CASCADE;
98
+ ALTER TABLE aboa.archived_files ADD CONSTRAINT archive_root_directories_fk FOREIGN KEY (root_directory_uuid)
99
+ REFERENCES aboa.archive_root_directories (root_directory_uuid) MATCH FULL
100
+ ON DELETE RESTRICT ON UPDATE CASCADE;
101
+ -- ddl-end --
102
+
103
+ -- object: archived_files_archive_configurations_fk | type: CONSTRAINT --
104
+ -- ALTER TABLE aboa.archived_files DROP CONSTRAINT IF EXISTS archived_files_archive_configurations_fk CASCADE;
105
+ ALTER TABLE aboa.archived_files ADD CONSTRAINT archived_files_archive_configurations_fk FOREIGN KEY (archive_configuration_uuid1)
106
+ REFERENCES aboa.archive_configurations (archive_configuration_uuid) MATCH FULL
107
+ ON DELETE SET NULL ON UPDATE CASCADE;
108
+ -- ddl-end --
109
+
110
+ -- object: archived_files_delete_archive_configurations_fk | type: CONSTRAINT --
111
+ -- ALTER TABLE aboa.archived_files DROP CONSTRAINT IF EXISTS archived_files_delete_archive_configurations_fk CASCADE;
112
+ ALTER TABLE aboa.archived_files ADD CONSTRAINT archived_files_delete_archive_configurations_fk FOREIGN KEY (delete_archive_configuration_uuid1)
113
+ REFERENCES aboa.archive_configurations (archive_configuration_uuid) MATCH FULL
114
+ ON DELETE SET NULL ON UPDATE CASCADE;
115
+ -- ddl-end --
116
+
117
+ -- object: aboa.archive_operations | type: TABLE --
118
+ -- DROP TABLE IF EXISTS aboa.archive_operations CASCADE;
119
+ CREATE TABLE aboa.archive_operations (
120
+ operation_uuid uuid NOT NULL,
121
+ operation text NOT NULL,
122
+ time_stamp timestamp NOT NULL,
123
+ status integer NOT NULL,
124
+ message text,
125
+ file_uuid uuid,
126
+ CONSTRAINT archive_operations_pk PRIMARY KEY (operation_uuid)
127
+ );
128
+ -- ddl-end --
129
+ ALTER TABLE aboa.archive_operations OWNER TO aboa;
130
+ -- ddl-end --
131
+
132
+ -- object: archived_files_fk | type: CONSTRAINT --
133
+ -- ALTER TABLE aboa.archive_operations DROP CONSTRAINT IF EXISTS archived_files_fk CASCADE;
134
+ ALTER TABLE aboa.archive_operations ADD CONSTRAINT archived_files_fk FOREIGN KEY (file_uuid)
135
+ REFERENCES aboa.archived_files (file_uuid) MATCH FULL
136
+ ON DELETE SET NULL ON UPDATE CASCADE;
137
+ -- ddl-end --
138
+
139
+ -- object: aboa.files_to_be_removed | type: TABLE --
140
+ -- DROP TABLE IF EXISTS aboa.files_to_be_removed CASCADE;
141
+ CREATE TABLE aboa.files_to_be_removed (
142
+ file_uuid uuid NOT NULL,
143
+ file_to_remove_uuid uuid NOT NULL,
144
+ root_directory_uuid uuid NOT NULL,
145
+ path text NOT NULL,
146
+ removal_date timestamp NOT NULL,
147
+ CONSTRAINT files_to_be_removed_pk PRIMARY KEY (file_to_remove_uuid)
148
+ );
149
+ -- ddl-end --
150
+ ALTER TABLE aboa.files_to_be_removed OWNER TO aboa;
151
+ -- ddl-end --
152
+
153
+ -- object: files_to_be_removed_archived_files_fk | type: CONSTRAINT --
154
+ -- ALTER TABLE aboa.files_to_be_removed DROP CONSTRAINT IF EXISTS files_to_be_removed_archived_files_fk CASCADE;
155
+ ALTER TABLE aboa.files_to_be_removed ADD CONSTRAINT files_to_be_removed_archived_files_fk FOREIGN KEY (file_uuid)
156
+ REFERENCES aboa.archived_files (file_uuid) MATCH FULL
157
+ ON DELETE CASCADE ON UPDATE CASCADE;
158
+ -- ddl-end --
159
+
160
+ -- object: files_to_be_removed_archive_root_directories_fk | type: CONSTRAINT --
161
+ -- ALTER TABLE aboa.files_to_be_removed DROP CONSTRAINT IF EXISTS files_to_be_removed_archive_root_directories_fk CASCADE;
162
+ ALTER TABLE aboa.files_to_be_removed ADD CONSTRAINT files_to_be_removed_archive_root_directories_fk FOREIGN KEY (root_directory_uuid)
163
+ REFERENCES aboa.archive_root_directories (root_directory_uuid) MATCH FULL
164
+ ON DELETE RESTRICT ON UPDATE CASCADE;
165
+ -- ddl-end --
166
+
167
+ -- object: idx_archived_files_name | type: INDEX --
168
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_name CASCADE;
169
+ CREATE INDEX idx_archived_files_name ON aboa.archived_files
170
+ USING btree
171
+ (
172
+ name
173
+ );
174
+ -- ddl-end --
175
+
176
+ -- object: idx_archived_files_path | type: INDEX --
177
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_path CASCADE;
178
+ CREATE INDEX idx_archived_files_path ON aboa.archived_files
179
+ USING btree
180
+ (
181
+ path
182
+ );
183
+ -- ddl-end --
184
+
185
+ -- object: idx_archived_files_archive_date | type: INDEX --
186
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_archive_date CASCADE;
187
+ CREATE INDEX idx_archived_files_archive_date ON aboa.archived_files
188
+ USING btree
189
+ (
190
+ archive_date
191
+ );
192
+ -- ddl-end --
193
+
194
+ -- object: idx_archived_files_generation_date | type: INDEX --
195
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_generation_date CASCADE;
196
+ CREATE INDEX idx_archived_files_generation_date ON aboa.archived_files
197
+ USING btree
198
+ (
199
+ generation_date
200
+ );
201
+ -- ddl-end --
202
+
203
+ -- object: idx_archived_files_validity_start_date | type: INDEX --
204
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_validity_start_date CASCADE;
205
+ CREATE INDEX idx_archived_files_validity_start_date ON aboa.archived_files
206
+ USING btree
207
+ (
208
+ validity_start_date
209
+ );
210
+ -- ddl-end --
211
+
212
+ -- object: idx_archived_files_validity_stop_date | type: INDEX --
213
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_validity_stop_date CASCADE;
214
+ CREATE INDEX idx_archived_files_validity_stop_date ON aboa.archived_files
215
+ USING btree
216
+ (
217
+ validity_stop_date
218
+ );
219
+ -- ddl-end --
220
+
221
+ -- object: idx_archived_files_file_group | type: INDEX --
222
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_file_group CASCADE;
223
+ CREATE INDEX idx_archived_files_file_group ON aboa.archived_files
224
+ USING btree
225
+ (
226
+ file_group
227
+ );
228
+ -- ddl-end --
229
+
230
+ -- object: idx_archived_files_file_type | type: INDEX --
231
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_file_type CASCADE;
232
+ CREATE INDEX idx_archived_files_file_type ON aboa.archived_files
233
+ USING btree
234
+ (
235
+ file_type
236
+ );
237
+ -- ddl-end --
238
+
239
+ -- object: idx_archived_files_file_class | type: INDEX --
240
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_file_class CASCADE;
241
+ CREATE INDEX idx_archived_files_file_class ON aboa.archived_files
242
+ USING btree
243
+ (
244
+ file_class
245
+ );
246
+ -- ddl-end --
247
+
248
+ -- object: idx_archived_files_file_version | type: INDEX --
249
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_file_version CASCADE;
250
+ CREATE INDEX idx_archived_files_file_version ON aboa.archived_files
251
+ USING btree
252
+ (
253
+ file_version
254
+ );
255
+ -- ddl-end --
256
+
257
+ -- object: idx_archived_files_available | type: INDEX --
258
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_available CASCADE;
259
+ CREATE INDEX idx_archived_files_available ON aboa.archived_files
260
+ USING btree
261
+ (
262
+ available
263
+ );
264
+ -- ddl-end --
265
+
266
+ -- object: idx_archived_files_physically_available | type: INDEX --
267
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_physically_available CASCADE;
268
+ CREATE INDEX idx_archived_files_physically_available ON aboa.archived_files
269
+ USING btree
270
+ (
271
+ physically_available
272
+ );
273
+ -- ddl-end --
274
+
275
+ -- object: idx_archived_files_expiration_date | type: INDEX --
276
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_expiration_date CASCADE;
277
+ CREATE INDEX idx_archived_files_expiration_date ON aboa.archived_files
278
+ USING btree
279
+ (
280
+ expiration_date
281
+ );
282
+ -- ddl-end --
283
+
284
+ -- object: idx_archived_files_removal_date | type: INDEX --
285
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_removal_date CASCADE;
286
+ CREATE INDEX idx_archived_files_removal_date ON aboa.archived_files
287
+ USING btree
288
+ (
289
+ removal_date
290
+ );
291
+ -- ddl-end --
292
+
293
+ -- object: idx_archived_files_removal_justification | type: INDEX --
294
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_removal_justification CASCADE;
295
+ CREATE INDEX idx_archived_files_removal_justification ON aboa.archived_files
296
+ USING btree
297
+ (
298
+ removal_justification
299
+ );
300
+ -- ddl-end --
301
+
302
+ -- object: idx_archived_files_archive_configuration_uuid | type: INDEX --
303
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_archive_configuration_uuid CASCADE;
304
+ CREATE INDEX idx_archived_files_archive_configuration_uuid ON aboa.archived_files
305
+ USING btree
306
+ (
307
+ archive_configuration_uuid
308
+ );
309
+ -- ddl-end --
310
+
311
+ -- object: idx_archived_files_delete_archive_configuration_uuid | type: INDEX --
312
+ -- DROP INDEX IF EXISTS aboa.idx_archived_files_delete_archive_configuration_uuid CASCADE;
313
+ CREATE INDEX idx_archived_files_delete_archive_configuration_uuid ON aboa.archived_files
314
+ USING btree
315
+ (
316
+ delete_archive_configuration_uuid
317
+ );
318
+ -- ddl-end --
319
+
320
+ -- object: idx_files_to_be_removed_path | type: INDEX --
321
+ -- DROP INDEX IF EXISTS aboa.idx_files_to_be_removed_path CASCADE;
322
+ CREATE INDEX idx_files_to_be_removed_path ON aboa.files_to_be_removed
323
+ USING btree
324
+ (
325
+ path
326
+ );
327
+ -- ddl-end --
328
+
329
+ -- object: idx_files_to_be_removed_root_directory_uuid | type: INDEX --
330
+ -- DROP INDEX IF EXISTS aboa.idx_files_to_be_removed_root_directory_uuid CASCADE;
331
+ CREATE INDEX idx_files_to_be_removed_root_directory_uuid ON aboa.files_to_be_removed
332
+ USING btree
333
+ (
334
+ root_directory_uuid
335
+ );
336
+ -- ddl-end --
337
+
338
+ -- object: idx_files_to_be_removed_removal_date | type: INDEX --
339
+ -- DROP INDEX IF EXISTS aboa.idx_files_to_be_removed_removal_date CASCADE;
340
+ CREATE INDEX idx_files_to_be_removed_removal_date ON aboa.files_to_be_removed
341
+ USING btree
342
+ (
343
+ removal_date
344
+ );
345
+ -- ddl-end --
346
+
347
+ -- object: idx_archive_root_directories_active | type: INDEX --
348
+ -- DROP INDEX IF EXISTS aboa.idx_archive_root_directories_active CASCADE;
349
+ CREATE INDEX idx_archive_root_directories_active ON aboa.archive_root_directories
350
+ USING btree
351
+ (
352
+ active
353
+ );
354
+ -- ddl-end --
355
+
356
+ -- object: idx_archive_configurations_active | type: INDEX --
357
+ -- DROP INDEX IF EXISTS aboa.idx_archive_configurations_active CASCADE;
358
+ CREATE INDEX idx_archive_configurations_active ON aboa.archive_configurations
359
+ USING btree
360
+ (
361
+ active
362
+ );
363
+ -- ddl-end --
364
+
365
+