Skip to content

Commit def9aa4

Browse files
jr-rkclaude
andcommitted
fix(db): drop hardcoded public. schema prefix from CLARIN migrations
The V7.2 Lindat/Clarin and V7.6 Preview migrations qualified their `ALTER TABLE ... OWNER TO dspace` statements with `public.`, so instances whose DSpace tables live in a non-public schema could not run them. Remove the qualifier (17 statements across the two files) so each resolves against the connection's search_path. The unrelated bitstore.xml storage-bean swap from the source commit is omitted -- dtq-dev already uses SyncBitstreamStorageServiceImpl. Port of dataquest-dev/dspace-customers#903 (item 5). Source: customer/vsb-tuo e2fb083. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 6114281 commit def9aa4

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.2_2022.07.28__Upgrade_to_Lindat_Clarin_schema.sql

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ CREATE TABLE license_definition (
3131
required_info varchar(256)
3232
);
3333

34-
ALTER TABLE public.license_definition OWNER TO dspace;
34+
ALTER TABLE license_definition OWNER TO dspace;
3535

3636
--
3737
-- Name: license_definition_license_id_seq; Type: SEQUENCE; Schema: public; Owner: dspace
@@ -44,7 +44,7 @@ CREATE SEQUENCE license_definition_license_id_seq
4444
NO MINVALUE
4545
CACHE 1;
4646

47-
ALTER TABLE public.license_definition_license_id_seq OWNER TO dspace;
47+
ALTER TABLE license_definition_license_id_seq OWNER TO dspace;
4848

4949
--
5050
-- Name: license_definition_license_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dspace
@@ -65,7 +65,7 @@ CREATE TABLE license_label (
6565
);
6666

6767

68-
ALTER TABLE public.license_label OWNER TO dspace;
68+
ALTER TABLE license_label OWNER TO dspace;
6969

7070
--
7171
-- Name: license_label_extended_mapping; Type: TABLE; Schema: public; Owner: dspace; Tablespace:
@@ -77,7 +77,7 @@ CREATE TABLE license_label_extended_mapping (
7777
label_id integer
7878
);
7979

80-
ALTER TABLE public.license_label_extended_mapping OWNER TO dspace;
80+
ALTER TABLE license_label_extended_mapping OWNER TO dspace;
8181

8282
--
8383
-- Name: license_label_extended_mapping_mapping_id_seq; Type: SEQUENCE; Schema: public; Owner: dspace
@@ -91,7 +91,7 @@ CREATE SEQUENCE license_label_extended_mapping_mapping_id_seq
9191
CACHE 1;
9292

9393

94-
ALTER TABLE public.license_label_extended_mapping_mapping_id_seq OWNER TO dspace;
94+
ALTER TABLE license_label_extended_mapping_mapping_id_seq OWNER TO dspace;
9595

9696
--
9797
-- Name: license_label_extended_mapping_mapping_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dspace
@@ -118,7 +118,7 @@ CREATE SEQUENCE license_label_label_id_seq
118118
CACHE 1;
119119

120120

121-
ALTER TABLE public.license_label_label_id_seq OWNER TO dspace;
121+
ALTER TABLE license_label_label_id_seq OWNER TO dspace;
122122

123123
--
124124
-- Name: license_label_label_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dspace
@@ -144,7 +144,7 @@ CREATE TABLE license_resource_mapping (
144144
);
145145

146146

147-
ALTER TABLE public.license_resource_mapping OWNER TO dspace;
147+
ALTER TABLE license_resource_mapping OWNER TO dspace;
148148

149149
--
150150
-- Name: license_resource_mapping_mapping_id_seq; Type: SEQUENCE; Schema: public; Owner: dspace
@@ -158,7 +158,7 @@ CREATE SEQUENCE license_resource_mapping_mapping_id_seq
158158
CACHE 1;
159159

160160

161-
ALTER TABLE public.license_resource_mapping_mapping_id_seq OWNER TO dspace;
161+
ALTER TABLE license_resource_mapping_mapping_id_seq OWNER TO dspace;
162162

163163
--
164164
-- Name: license_resource_mapping_mapping_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dspace
@@ -186,7 +186,7 @@ CREATE TABLE license_resource_user_allowance (
186186
token varchar(256)
187187
);
188188

189-
ALTER TABLE public.license_resource_user_allowance OWNER TO dspace;
189+
ALTER TABLE license_resource_user_allowance OWNER TO dspace;
190190

191191
--
192192
-- Name: license_resource_user_allowance_transaction_id_seq; Type: SEQUENCE; Schema: public; Owner: dspace
@@ -199,7 +199,7 @@ CREATE SEQUENCE license_resource_user_allowance_transaction_id_seq
199199
NO MINVALUE
200200
CACHE 1;
201201

202-
ALTER TABLE public.license_resource_user_allowance_transaction_id_seq OWNER TO dspace;
202+
ALTER TABLE license_resource_user_allowance_transaction_id_seq OWNER TO dspace;
203203

204204
--
205205
-- Name: license_resource_user_allowance_transaction_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dspace
@@ -224,7 +224,7 @@ CREATE TABLE user_registration (
224224
confirmation boolean DEFAULT true
225225
);
226226

227-
ALTER TABLE public.user_registration OWNER TO dspace;
227+
ALTER TABLE user_registration OWNER TO dspace;
228228

229229
CREATE SEQUENCE user_registration_user_registration_id_seq
230230
START WITH 1
@@ -233,7 +233,7 @@ CREATE SEQUENCE user_registration_user_registration_id_seq
233233
NO MINVALUE
234234
CACHE 1;
235235

236-
ALTER TABLE public.user_registration_user_registration_id_seq OWNER TO dspace;
236+
ALTER TABLE user_registration_user_registration_id_seq OWNER TO dspace;
237237

238238
--
239239
-- Name: user_registration_user_registration_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dspace
@@ -254,7 +254,7 @@ CREATE TABLE user_metadata (
254254
);
255255

256256

257-
ALTER TABLE public.user_metadata OWNER TO dspace;
257+
ALTER TABLE user_metadata OWNER TO dspace;
258258

259259
--
260260
-- Name: user_metadata_user_metadata_id_seq; Type: SEQUENCE; Schema: public; Owner: dspace
@@ -268,7 +268,7 @@ CREATE SEQUENCE user_metadata_user_metadata_id_seq
268268
CACHE 1;
269269

270270

271-
ALTER TABLE public.user_metadata_user_metadata_id_seq OWNER TO dspace;
271+
ALTER TABLE user_metadata_user_metadata_id_seq OWNER TO dspace;
272272

273273
--
274274
-- Name: user_metadata_user_metadata_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dspace

dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V7.6_2024.08.05__Added_Preview_Tables.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CREATE TABLE previewcontent (
1919
size varchar(256)
2020
);
2121

22-
ALTER TABLE public.previewcontent OWNER TO dspace;
22+
ALTER TABLE previewcontent OWNER TO dspace;
2323

2424
--
2525
-- Name: previewcontent_previewcontent_id_seq; Type: SEQUENCE; Schema: public; Owner: dspace
@@ -32,7 +32,7 @@ CREATE SEQUENCE previewcontent_previewcontent_id_seq
3232
NO MINVALUE
3333
CACHE 1;
3434

35-
ALTER TABLE public.previewcontent_previewcontent_id_seq OWNER TO dspace;
35+
ALTER TABLE previewcontent_previewcontent_id_seq OWNER TO dspace;
3636

3737
--
3838
-- Name: previewcontent_previewcontent_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dspace
@@ -64,7 +64,7 @@ CREATE TABLE preview2preview (
6464
name varchar(2000)
6565
);
6666

67-
ALTER TABLE public.preview2preview OWNER TO dspace;
67+
ALTER TABLE preview2preview OWNER TO dspace;
6868

6969
--
7070
-- Name: preview2preview_pkey; Type: CONSTRAINT; Schema: public; Owner: dspace; Tablespace:

0 commit comments

Comments
 (0)