golang.org/x/build@v0.0.0-20240506185731-218518f32b70/perfdata/db/schema.sql (about)

     1  -- Copyright 2022 The Go Authors. All rights reserved.
     2  -- Use of this source code is governed by a BSD-style
     3  -- license that can be found in the LICENSE file.
     4  
     5  -- The intended production Cloud SQL schema. Committed here only as a
     6  -- form of notes (see the actual current schema in
     7  -- db.go:createTables).
     8  
     9  CREATE TABLE Uploads (
    10         UploadId SERIAL PRIMARY KEY AUTO_INCREMENT
    11  );
    12  CREATE TABLE Records (
    13         UploadId BIGINT UNSIGNED,
    14         RecordId BIGINT UNSIGNED,
    15         Contents BLOB,
    16         PRIMARY KEY (UploadId, RecordId),
    17         FOREIGN KEY (UploadId) REFERENCES Uploads(UploadId)
    18  );
    19  CREATE TABLE RecordLabels (
    20         UploadId BIGINT UNSIGNED,
    21         RecordId BIGINT UNSIGNED,
    22         Name VARCHAR(255),
    23         Value VARCHAR(8192),
    24         INDEX (Name(100), Value(100)),
    25         FOREIGN KEY (UploadId, RecordId) REFERENCES Records(UploadId, RecordId)
    26  );