Merge branch 'main' into avm99963-monorail
Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266
GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/schema/PRESUBMIT.py b/schema/PRESUBMIT.py
index e07745c..897cb86 100644
--- a/schema/PRESUBMIT.py
+++ b/schema/PRESUBMIT.py
@@ -1,7 +1,6 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file or at
-# https://developers.google.com/open-source/licenses/bsd
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
"""Presubmit script just for Monorail's SQL files."""
from __future__ import print_function
diff --git a/schema/alter-table-log.txt b/schema/alter-table-log.txt
index 26c21dd..bbc9381 100644
--- a/schema/alter-table-log.txt
+++ b/schema/alter-table-log.txt
@@ -1,7 +1,6 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file or at
-# https://developers.google.com/open-source/licenses/bsd
+# Copyright 2016 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
This file contains a log of ALTER TABLE statements that need to be executed
to bring a Monorail SQL database up to the current schema.
@@ -1742,3 +1741,13 @@
ALTER TABLE Project ADD COLUMN issue_notify_always_detailed BOOLEAN DEFAULT FALSE;
+================================================================
+2022-12-27: Added more IssueUpdate fields.
+
+ALTER TABLE IssueUpdate ADD COLUMN added_component_id VARCHAR(80);
+ALTER TABLE IssueUpdate ADD COLUMN removed_component_id VARCHAR(80);
+
+================================================================
+2023-09-11: Add new modified timestamp. See: go/monorail-enhanced-modified-time
+
+ALTER TABLE Issue ADD COLUMN migration_modified INT;
diff --git a/schema/framework.sql b/schema/framework.sql
index 4a35106..f7ef83f 100644
--- a/schema/framework.sql
+++ b/schema/framework.sql
@@ -1,8 +1,6 @@
--- Copyright 2016 The Chromium Authors. All Rights Reserved.
---
--- Use of this source code is governed by a BSD-style
--- license that can be found in the LICENSE file or at
--- https://developers.google.com/open-source/licenses/bsd
+-- Copyright 2016 The Chromium Authors
+-- Use of this source code is governed by a BSD-style license that can be
+-- found in the LICENSE file.
-- Create app framework tables in the monorail DB.
diff --git a/schema/project.sql b/schema/project.sql
index cb3cd42..82bbde8 100644
--- a/schema/project.sql
+++ b/schema/project.sql
@@ -1,8 +1,6 @@
--- Copyright 2016 The Chromium Authors. All Rights Reserved.
---
--- Use of this source code is governed by a BSD-style
--- license that can be found in the LICENSE file or at
--- https://developers.google.com/open-source/licenses/bsd
+-- Copyright 2016 The Chromium Authors
+-- Use of this source code is governed by a BSD-style license that can be
+-- found in the LICENSE file.
-- Create project-related tables in monorail db.
diff --git a/schema/tracker.sql b/schema/tracker.sql
index b445129..1b43b5f 100644
--- a/schema/tracker.sql
+++ b/schema/tracker.sql
@@ -1,8 +1,6 @@
--- Copyright 2016 The Chromium Authors. All Rights Reserved.
---
--- Use of this source code is governed by a BSD-style
--- license that can be found in the LICENSE file or at
--- https://developers.google.com/open-source/licenses/bsd
+-- Copyright 2016 The Chromium Authors
+-- Use of this source code is governed by a BSD-style license that can be
+-- found in the LICENSE file.
-- Create issue-realted tables in monorail db.
@@ -171,6 +169,7 @@
owner_modified INT,
status_modified INT,
component_modified INT,
+ migration_modified INT,
derived_owner_id INT UNSIGNED,
derived_status_id INT,
@@ -432,6 +431,8 @@
new_value MEDIUMTEXT COLLATE utf8mb4_unicode_ci,
added_user_id INT UNSIGNED,
removed_user_id INT UNSIGNED,
+ added_component_id INT,
+ removed_component_id INT,
custom_field_name VARCHAR(255),
is_spam BOOLEAN DEFAULT FALSE,