Skip to content

Commit 6196d23

Browse files
committed
add all addressable tables
1 parent e308210 commit 6196d23

27 files changed

Lines changed: 1319 additions & 149 deletions

Analyzer/Resources/Init.sql

Lines changed: 233 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,111 @@ CREATE TABLE addr_builds
120120
PRIMARY KEY (id)
121121
);
122122

123+
create table addr_build_bundles
124+
(
125+
id INTEGER,
126+
build_id INTEGER,
127+
asset_count INTEGER,
128+
build_status INTEGER,
129+
crc INTEGER,
130+
compression TEXT,
131+
dependency_file_size INTEGER,
132+
expanded_dependency_file_size INTEGER,
133+
file_size INTEGER,
134+
group_rid INTEGER,
135+
hash TEXT,
136+
internal_name TEXT,
137+
load_path TEXT,
138+
name TEXT,
139+
provider TEXT,
140+
result_type TEXT,
141+
PRIMARY KEY (id, build_id)
142+
);
143+
create table addr_build_bundle_dependent_bundles
144+
(
145+
bundle_id INTEGER,
146+
build_id INTEGER,
147+
dependent_bundle_rid INTEGER,
148+
PRIMARY KEY (bundle_id, build_id, dependent_bundle_rid),
149+
FOREIGN KEY (bundle_id, build_id) REFERENCES addr_build_bundles(id, build_id)
150+
);
151+
create table addr_build_bundle_dependencies
152+
(
153+
bundle_id INTEGER,
154+
build_id INTEGER,
155+
dependency_rid INTEGER,
156+
PRIMARY KEY (bundle_id, build_id, dependency_rid),
157+
FOREIGN KEY (bundle_id, build_id) REFERENCES addr_build_bundles(id, build_id)
158+
);
159+
create table addr_build_bundle_expanded_dependencies
160+
(
161+
bundle_id INTEGER,
162+
build_id INTEGER,
163+
dependency_rid INTEGER,
164+
PRIMARY KEY (bundle_id, build_id, dependency_rid),
165+
FOREIGN KEY (bundle_id, build_id) REFERENCES addr_build_bundles(id, build_id)
166+
);
167+
168+
create table addr_build_bundle_files
169+
(
170+
bundle_id INTEGER,
171+
build_id INTEGER,
172+
file_rid INTEGER,
173+
PRIMARY KEY (bundle_id, build_id, file_rid),
174+
FOREIGN KEY (bundle_id, build_id) REFERENCES addr_build_bundles(id, build_id)
175+
);
176+
create table addr_build_bundle_regular_dependencies
177+
(
178+
bundle_id INTEGER,
179+
build_id INTEGER,
180+
dependency_rid INTEGER,
181+
PRIMARY KEY (bundle_id, build_id, dependency_rid),
182+
FOREIGN KEY (bundle_id, build_id) REFERENCES addr_build_bundles(id, build_id)
183+
);
184+
create table addr_build_data_from_other_assets
185+
(
186+
id INTEGER,
187+
build_id INTEGER,
188+
asset_guid TEXT,
189+
asset_path TEXT,
190+
file INTEGER,
191+
main_asset_type INTEGER,
192+
object_count INTEGER,
193+
serialized_size INTEGER,
194+
streamed_size INTEGER,
195+
PRIMARY KEY (id, build_id)
196+
);
197+
create table addr_build_data_from_other_asset_objects
198+
(
199+
data_from_other_asset_id INTEGER,
200+
build_id INTEGER,
201+
asset_type INTEGER,
202+
component_name TEXT,
203+
local_identifier_in_file INTEGER,
204+
object_name TEXT,
205+
serialized_size INTEGER,
206+
streamed_size INTEGER,
207+
PRIMARY KEY (data_from_other_asset_id, build_id, local_identifier_in_file),
208+
FOREIGN KEY (data_from_other_asset_id, build_id) REFERENCES addr_build_data_from_other_assets(id, build_id)
209+
);
210+
create table addr_build_data_from_other_asset_object_references
211+
(
212+
data_from_other_asset_id INTEGER,
213+
build_id INTEGER,
214+
local_identifier_in_file INTEGER,
215+
asset_id INTEGER,
216+
object_id INTEGER,
217+
PRIMARY KEY (data_from_other_asset_id, build_id, local_identifier_in_file, asset_id, object_id),
218+
FOREIGN KEY (data_from_other_asset_id, build_id, local_identifier_in_file) REFERENCES addr_build_data_from_other_asset_objects(data_from_other_asset_id, build_id, local_identifier_in_file)
219+
);
220+
create table addr_build_data_from_other_asset_referencing_assets
221+
(
222+
data_from_other_asset_id INTEGER,
223+
build_id INTEGER,
224+
referencing_asset_rid INTEGER,
225+
PRIMARY KEY (data_from_other_asset_id, build_id, referencing_asset_rid),
226+
FOREIGN KEY (data_from_other_asset_id, build_id) REFERENCES addr_build_data_from_other_assets(id, build_id)
227+
);
123228
create table addr_build_explicit_assets
124229
(
125230
id INTEGER,
@@ -129,18 +234,141 @@ create table addr_build_explicit_assets
129234
asset_hash TEXT,
130235
asset_path TEXT,
131236
addressable_name TEXT,
132-
externally_referenced_assets TEXT,
133237
group_guid TEXT,
134238
guid TEXT,
135239
internal_id TEXT,
136-
internal_referenced_explicit_assets TEXT,
137-
internal_referenced_other_assets TEXT,
138-
labels TEXT,
139240
main_asset_type INTEGER,
140241
serialized_size INTEGER,
141242
streamed_size INTEGER,
142243
PRIMARY KEY (id, build_id)
143244
);
144-
245+
create table addr_build_explicit_asset_externally_referenced_assets
246+
(
247+
explicit_asset_id INTEGER,
248+
build_id INTEGER,
249+
externally_referenced_asset_rid INTEGER,
250+
PRIMARY KEY (explicit_asset_id, build_id, externally_referenced_asset_rid),
251+
FOREIGN KEY (explicit_asset_id, build_id) REFERENCES addr_build_explicit_assets(id, build_id)
252+
);
253+
create table addr_build_explicit_asset_internal_referenced_explicit_assets
254+
(
255+
explicit_asset_id INTEGER,
256+
build_id INTEGER,
257+
internal_referenced_explicit_asset_rid INTEGER,
258+
PRIMARY KEY (explicit_asset_id, build_id, internal_referenced_explicit_asset_rid),
259+
FOREIGN KEY (explicit_asset_id, build_id) REFERENCES addr_build_explicit_assets(id, build_id)
260+
);
261+
create table addr_build_explicit_asset_internal_referenced_other_assets
262+
(
263+
explicit_asset_id INTEGER,
264+
build_id INTEGER,
265+
internal_referenced_other_asset_rid INTEGER,
266+
PRIMARY KEY (explicit_asset_id, build_id, internal_referenced_other_asset_rid),
267+
FOREIGN KEY (explicit_asset_id, build_id) REFERENCES addr_build_explicit_assets(id, build_id)
268+
);
269+
create table addr_build_explicit_asset_labels
270+
(
271+
explicit_asset_id INTEGER,
272+
build_id INTEGER,
273+
label TEXT,
274+
PRIMARY KEY (explicit_asset_id, build_id, label),
275+
FOREIGN KEY (explicit_asset_id, build_id) REFERENCES addr_build_explicit_assets(id, build_id)
276+
);
277+
create table addr_build_files
278+
(
279+
id INTEGER,
280+
build_id INTEGER,
281+
bundle INTEGER,
282+
bundle_object_info_size INTEGER,
283+
mono_script_count INTEGER,
284+
mono_script_size INTEGER,
285+
name TEXT,
286+
preload_info_size INTEGER,
287+
write_result_filename TEXT,
288+
PRIMARY KEY (id, build_id)
289+
);
290+
create table addr_build_file_assets
291+
(
292+
file_id INTEGER,
293+
build_id INTEGER,
294+
asset_rid INTEGER,
295+
PRIMARY KEY (file_id, build_id, asset_rid),
296+
FOREIGN KEY (file_id, build_id) REFERENCES addr_build_files(id, build_id)
297+
);
298+
create table addr_build_file_other_assets
299+
(
300+
file_id INTEGER,
301+
build_id INTEGER,
302+
other_asset_rid INTEGER,
303+
PRIMARY KEY (file_id, build_id, other_asset_rid),
304+
FOREIGN KEY (file_id, build_id) REFERENCES addr_build_files(id, build_id)
305+
);
306+
create table addr_build_file_sub_files
307+
(
308+
file_id INTEGER,
309+
build_id INTEGER,
310+
sub_file_rid INTEGER,
311+
PRIMARY KEY (file_id, build_id, sub_file_rid),
312+
FOREIGN KEY (file_id, build_id) REFERENCES addr_build_files(id, build_id)
313+
);
314+
create table addr_build_file_external_references
315+
(
316+
file_id INTEGER,
317+
build_id INTEGER,
318+
external_reference_rid INTEGER,
319+
PRIMARY KEY (file_id, build_id, external_reference_rid),
320+
FOREIGN KEY (file_id, build_id) REFERENCES addr_build_files(id, build_id)
321+
);
322+
create table addr_build_groups
323+
(
324+
id INTEGER,
325+
build_id INTEGER,
326+
guid TEXT,
327+
name TEXT,
328+
packing_mode TEXT,
329+
PRIMARY KEY (id, build_id)
330+
);
331+
create table addr_build_group_bundles
332+
(
333+
group_id INTEGER,
334+
build_id INTEGER,
335+
bundle_rid INTEGER,
336+
PRIMARY KEY (group_id, build_id, bundle_rid),
337+
FOREIGN KEY (group_id, build_id) REFERENCES addr_build_groups(id, build_id)
338+
);
339+
create table addr_build_group_schemas
340+
(
341+
group_id INTEGER,
342+
build_id INTEGER,
343+
schema_rid INTEGER,
344+
PRIMARY KEY (group_id, build_id, schema_rid),
345+
FOREIGN KEY (group_id, build_id) REFERENCES addr_build_groups(id, build_id)
346+
);
347+
create table addr_build_schemas
348+
(
349+
id INTEGER,
350+
build_id INTEGER,
351+
guid TEXT,
352+
type TEXT,
353+
PRIMARY KEY (id, build_id)
354+
);
355+
create table addr_build_schema_data_pairs
356+
(
357+
schema_id INTEGER,
358+
build_id INTEGER,
359+
key TEXT,
360+
value TEXT,
361+
PRIMARY KEY (schema_id, build_id, key),
362+
FOREIGN KEY (schema_id, build_id) REFERENCES addr_build_schemas(id, build_id)
363+
);
364+
create table addr_build_sub_files
365+
(
366+
id INTEGER,
367+
build_id INTEGER,
368+
is_serialized_file INTEGER,
369+
name TEXT,
370+
size INTEGER,
371+
PRIMARY KEY (id, build_id)
372+
);
145373
PRAGMA synchronous = OFF;
146374
PRAGMA journal_mode = MEMORY;

Analyzer/SQLite/Commands/AddressablesBuildBundle.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@ create table addr_build_bundles
1010
build_id INTEGER,
1111
asset_count INTEGER,
1212
build_status INTEGER,
13-
bundle_dependencies TEXT,
1413
crc INTEGER,
1514
compression TEXT,
16-
dependencies TEXT,
1715
dependency_file_size INTEGER,
18-
dependent_bundles TEXT,
19-
expanded_dependencies TEXT,
2016
expanded_dependency_file_size INTEGER,
2117
file_size INTEGER,
22-
files TEXT,
2318
group_rid INTEGER,
2419
hash TEXT,
2520
internal_name TEXT,
@@ -40,16 +35,11 @@ internal class AddressablesBuildBundle : AbstractCommand
4035
{ "build_id", SqliteType.Integer },
4136
{ "asset_count", SqliteType.Integer },
4237
{ "build_status", SqliteType.Integer },
43-
{ "bundle_dependencies", SqliteType.Text }, // JSONB type in SQLite uses TEXT
4438
{ "crc", SqliteType.Integer },
4539
{ "compression", SqliteType.Text },
46-
{ "dependencies", SqliteType.Text }, // JSONB type in SQLite uses TEXT
4740
{ "dependency_file_size", SqliteType.Integer },
48-
{ "dependent_bundles", SqliteType.Text }, // JSONB type in SQLite uses TEXT
49-
{ "expanded_dependencies", SqliteType.Text }, // JSONB type in SQLite uses TEXT
5041
{ "expanded_dependency_file_size", SqliteType.Integer },
5142
{ "file_size", SqliteType.Integer },
52-
{ "files", SqliteType.Text }, // JSONB type in SQLite uses TEXT
5343
{ "group_rid", SqliteType.Integer },
5444
{ "hash", SqliteType.Text }, // JSON object stored as TEXT
5545
{ "internal_name", SqliteType.Text },
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using Microsoft.Data.Sqlite;
2+
using System.Collections.Generic;
3+
4+
namespace Analyzer.SQLite.Commands
5+
{
6+
/* TABLE DEFINITION:
7+
create table addr_build_bundle_dependencies
8+
(
9+
bundle_id INTEGER,
10+
build_id INTEGER,
11+
dependency_rid INTEGER,
12+
PRIMARY KEY (bundle_id, build_id, dependency_rid),
13+
FOREIGN KEY (bundle_id, build_id) REFERENCES addr_build_bundles(id, build_id)
14+
);
15+
*/
16+
internal class AddressablesBuildBundleDependency : AbstractCommand
17+
{
18+
protected override string TableName => "addr_build_bundle_dependencies";
19+
20+
protected override Dictionary<string, SqliteType> Fields => new Dictionary<string, SqliteType>
21+
{
22+
{ "bundle_id", SqliteType.Integer },
23+
{ "build_id", SqliteType.Integer },
24+
{ "dependency_rid", SqliteType.Integer }
25+
};
26+
27+
public AddressablesBuildBundleDependency()
28+
{
29+
}
30+
}
31+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using Microsoft.Data.Sqlite;
2+
using System.Collections.Generic;
3+
4+
namespace Analyzer.SQLite.Commands
5+
{
6+
/* TABLE DEFINITION:
7+
create table addr_build_bundle_dependent_bundles
8+
(
9+
bundle_id INTEGER,
10+
build_id INTEGER,
11+
dependent_bundle_rid INTEGER,
12+
PRIMARY KEY (bundle_id, build_id, dependent_bundle_rid),
13+
FOREIGN KEY (bundle_id, build_id) REFERENCES addr_build_bundles(id, build_id)
14+
);
15+
*/
16+
internal class AddressablesBuildBundleDependentBundle : AbstractCommand
17+
{
18+
protected override string TableName => "addr_build_bundle_dependent_bundles";
19+
20+
protected override Dictionary<string, SqliteType> Fields => new Dictionary<string, SqliteType>
21+
{
22+
{ "bundle_id", SqliteType.Integer },
23+
{ "build_id", SqliteType.Integer },
24+
{ "dependent_bundle_rid", SqliteType.Integer }
25+
};
26+
27+
public AddressablesBuildBundleDependentBundle()
28+
{
29+
}
30+
}
31+
}
32+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using Microsoft.Data.Sqlite;
2+
using System.Collections.Generic;
3+
4+
namespace Analyzer.SQLite.Commands
5+
{
6+
/* TABLE DEFINITION:
7+
create table addr_build_bundle_expanded_dependencies
8+
(
9+
bundle_id INTEGER,
10+
build_id INTEGER,
11+
dependency_rid INTEGER,
12+
PRIMARY KEY (bundle_id, build_id, dependency_rid),
13+
FOREIGN KEY (bundle_id, build_id) REFERENCES addr_build_bundles(id, build_id)
14+
);
15+
*/
16+
internal class AddressablesBuildBundleExpandedDependency : AbstractCommand
17+
{
18+
protected override string TableName => "addr_build_bundle_expanded_dependencies";
19+
20+
protected override Dictionary<string, SqliteType> Fields => new Dictionary<string, SqliteType>
21+
{
22+
{ "bundle_id", SqliteType.Integer },
23+
{ "build_id", SqliteType.Integer },
24+
{ "dependency_rid", SqliteType.Integer }
25+
};
26+
27+
public AddressablesBuildBundleExpandedDependency()
28+
{
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)