mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:31:43 +00:00
notebooks: set default pattern type to keyword (#63662)
Relates to https://github.com/sourcegraph/sourcegraph/pull/63472 This changes the default patternType of Notebooks from "standard" to "keyword". As a consequence, all new notebooks will default to keyword search. Existing notebooks will keep using standard search. Test plan: - I ran the migration locally and verified that new notebooks use "keyword" as default.
This commit is contained in:
parent
12b0e4e233
commit
e3d112b01c
@ -11299,6 +11299,20 @@
|
||||
],
|
||||
"IsCreateIndexConcurrently": false,
|
||||
"IndexMetadata": null
|
||||
},
|
||||
{
|
||||
"ID": 1720165387,
|
||||
"Name": "notebooks default to keyword search",
|
||||
"UpQuery": "ALTER TABLE IF EXISTS notebooks ALTER COLUMN pattern_type SET DEFAULT 'keyword';",
|
||||
"DownQuery": "ALTER TABLE IF EXISTS notebooks ALTER COLUMN pattern_type SET DEFAULT 'standard';",
|
||||
"Privileged": false,
|
||||
"NonIdempotent": false,
|
||||
"Parents": [
|
||||
1719214941,
|
||||
1719498128
|
||||
],
|
||||
"IsCreateIndexConcurrently": false,
|
||||
"IndexMetadata": null
|
||||
}
|
||||
],
|
||||
"BoundsByRev": {
|
||||
@ -11559,8 +11573,7 @@
|
||||
"v5.4.0": {
|
||||
"RootID": 1648051770,
|
||||
"LeafIDs": [
|
||||
1719214941,
|
||||
1719498128
|
||||
1720165387
|
||||
],
|
||||
"PreCreation": false
|
||||
}
|
||||
|
||||
@ -19142,7 +19142,7 @@
|
||||
"Index": 12,
|
||||
"TypeName": "pattern_type",
|
||||
"IsNullable": false,
|
||||
"Default": "'standard'::pattern_type",
|
||||
"Default": "'keyword'::pattern_type",
|
||||
"CharacterMaximumLength": 0,
|
||||
"IsIdentity": false,
|
||||
"IdentityGeneration": "",
|
||||
|
||||
@ -2806,7 +2806,7 @@ Foreign-key constraints:
|
||||
namespace_user_id | integer | | |
|
||||
namespace_org_id | integer | | |
|
||||
updater_user_id | integer | | |
|
||||
pattern_type | pattern_type | | not null | 'standard'::pattern_type
|
||||
pattern_type | pattern_type | | not null | 'keyword'::pattern_type
|
||||
Indexes:
|
||||
"notebooks_pkey" PRIMARY KEY, btree (id)
|
||||
"notebooks_blocks_tsvector_idx" gin (blocks_tsvector)
|
||||
|
||||
@ -0,0 +1 @@
|
||||
ALTER TABLE IF EXISTS notebooks ALTER COLUMN pattern_type SET DEFAULT 'standard';
|
||||
@ -0,0 +1,2 @@
|
||||
name: notebooks default to keyword search
|
||||
parents: [1719214941, 1719498128]
|
||||
@ -0,0 +1 @@
|
||||
ALTER TABLE IF EXISTS notebooks ALTER COLUMN pattern_type SET DEFAULT 'keyword';
|
||||
@ -3571,7 +3571,7 @@ CREATE TABLE notebooks (
|
||||
namespace_user_id integer,
|
||||
namespace_org_id integer,
|
||||
updater_user_id integer,
|
||||
pattern_type pattern_type DEFAULT 'standard'::pattern_type NOT NULL,
|
||||
pattern_type pattern_type DEFAULT 'keyword'::pattern_type NOT NULL,
|
||||
CONSTRAINT blocks_is_array CHECK ((jsonb_typeof(blocks) = 'array'::text)),
|
||||
CONSTRAINT notebooks_has_max_1_namespace CHECK ((((namespace_user_id IS NULL) AND (namespace_org_id IS NULL)) OR ((namespace_user_id IS NULL) <> (namespace_org_id IS NULL))))
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user