This is an automated email from the ASF dual-hosted git repository.
aicam pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/main by this push:
new 93f587fa32 feat: add Markdown editor for dataset/workflow descriptions
(#4212)
93f587fa32 is described below
commit 93f587fa325aea5e97c718f5f4e7b2a83e6384b5
Author: Xuan Gu <[email protected]>
AuthorDate: Wed Feb 18 14:25:45 2026 -0800
feat: add Markdown editor for dataset/workflow descriptions (#4212)
<!--
Thanks for sending a pull request (PR)! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
[Contributing to
Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md)
2. Ensure you have added or run the appropriate tests for your PR
3. If the PR is work in progress, mark it a draft on GitHub.
4. Please write your PR title to summarize what this PR proposes, we
are following Conventional Commits style for PR titles as well.
5. Be sure to keep the PR description updated to reflect all changes.
-->
### What changes were proposed in this PR?
<!--
Please clarify what changes you are proposing. The purpose of this
section
is to outline the changes. Here are some tips for you:
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
3. If it is a refactoring, clarify what has been changed.
3. It would be helpful to include a before-and-after comparison using
screenshots or GIFs.
4. Please consider writing useful notes for better and faster reviews.
-->
This PR adds Markdown support for dataset/workflow descriptions,
replacing plain text rendering with Markdown preview and editing.
**Changes:**
- Add `MarkdownDescriptionComponent` with two modes:
- Preview mode: Renders description as Markdown using existing
ngx-markdown (MarkdownService)
- Edit mode: Native `<textarea nz-input>` with an ng-zorro toolbar for
inserting common Markdown syntax (bold, italic, heading, list, table,
link, image, code block, etc.) and a side-by-side live preview
- Update `ListItemComponent` to open the Markdown editor in a modal for
description editing
- Change `description` column from `VARCHAR` to `TEXT` for dataset and
workflow tables to support longer Markdown content
Editor:
<img width="1389" height="720" alt="editor-description"
src="https://github.com/user-attachments/assets/2ab66e7a-0582-43f0-b1e0-08251f828bfc"
/>
Dataset page:
<img width="1412" height="746" alt="dataset-description"
src="https://github.com/user-attachments/assets/f225702f-edd9-48b9-9ed5-bb98218a96b5"
/>
Workflow page:
<img width="1387" height="757" alt="workflow-description"
src="https://github.com/user-attachments/assets/c9a02eef-189b-4487-a786-ded982b54b75"
/>
### Any related issues, documentation, discussions?
<!--
Please use this section to link other resources if not mentioned
already.
1. If this PR fixes an issue, please include `Fixes #1234`, `Resolves
#1234`
or `Closes #1234`. If it is only related, simply mention the issue
number.
2. If there is design documentation, please add the link.
3. If there is a discussion in the mailing list, please add the link.
-->
Fixes #4209
### How was this PR tested?
<!--
If tests were added, say they were added here. Or simply mention that if
the PR
is tested with existing test cases. Make sure to include/update test
cases that
check the changes thoroughly including negative and positive cases if
possible.
If it was tested in a way different from regular unit tests, please
clarify how
you tested step by step, ideally copy and paste-able, so that other
reviewers can
test and check, and descendants can verify in the future. If tests were
not added,
please describe why they were not added and/or why it was difficult to
add.
-->
Manually tested
### Was this PR authored or co-authored using generative AI tooling?
<!--
If generative AI tooling has been used in the process of authoring this
PR,
please include the phrase: 'Generated-by: ' followed by the name of the
tool
and its version. If no, write 'No'.
Please refer to the [ASF Generative Tooling
Guidance](https://www.apache.org/legal/generative-tooling.html) for
details.
-->
Generated-by: Claude Opus 4.6
---------
Signed-off-by: Xuan Gu <[email protected]>
---
frontend/src/app/app.module.ts | 2 +
.../user/list-item/list-item.component.html | 15 +--
.../user/list-item/list-item.component.scss | 1 +
.../user/list-item/list-item.component.ts | 49 +++++++--
.../markdown-description.component.html | 77 ++++++++++++++
.../markdown-description.component.scss | 94 +++++++++++++++++
.../markdown-description.component.ts | 117 +++++++++++++++++++++
.../dataset-detail.component.html | 4 +-
.../detail/hub-workflow-detail.component.html | 2 +-
sql/texera_ddl.sql | 4 +-
sql/updates/22.sql | 33 ++++++
11 files changed, 371 insertions(+), 27 deletions(-)
diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts
index 32cfd2261d..b41b1f80b7 100644
--- a/frontend/src/app/app.module.ts
+++ b/frontend/src/app/app.module.ts
@@ -184,6 +184,7 @@ import { NzInputNumberModule } from
"ng-zorro-antd/input-number";
import { NzCheckboxModule } from "ng-zorro-antd/checkbox";
import { NzRadioModule } from "ng-zorro-antd/radio";
import { RegistrationRequestModalComponent } from
"./common/service/user/registration-request-modal/registration-request-modal.component";
+import { MarkdownDescriptionComponent } from
"./dashboard/component/user/markdown-description/markdown-description.component";
registerLocaleData(en);
@@ -281,6 +282,7 @@ registerLocaleData(en);
ComputingUnitSelectionComponent,
AdminSettingsComponent,
RegistrationRequestModalComponent,
+ MarkdownDescriptionComponent,
],
imports: [
BrowserModule,
diff --git
a/frontend/src/app/dashboard/component/user/list-item/list-item.component.html
b/frontend/src/app/dashboard/component/user/list-item/list-item.component.html
index a1f78f2532..16e190b41f 100644
---
a/frontend/src/app/dashboard/component/user/list-item/list-item.component.html
+++
b/frontend/src/app/dashboard/component/user/list-item/list-item.component.html
@@ -108,19 +108,10 @@
<div
class="resource-description truncate-single-line"
- (click)="onEditDescription();$event.stopPropagation()"
- *ngIf="!editingDescription">
- {{ entry.description ? entry.description.slice(0, 200) : (hovering) ?
'Write a description...' : '' }}
+ (click)="onEditDescription(); $event.stopPropagation()">
+ {{ renderedDescription ? renderedDescription.slice(0, 200) : (hovering
&& editable) ? 'Write a description...' :
+ '' }}
</div>
- <textarea
- *ngIf="editingDescription"
- #descriptionInput
- class="resource-description-edit-textarea"
- [(ngModel)]="entry.description"
- (blur)="confirmUpdateCustomDescription(entry.description)"
- (keydown.enter)="confirmUpdateCustomDescription(entry.description)"
- (click)="$event.stopPropagation()"
- autofocus></textarea>
</div>
<div
diff --git
a/frontend/src/app/dashboard/component/user/list-item/list-item.component.scss
b/frontend/src/app/dashboard/component/user/list-item/list-item.component.scss
index 9c81256ec8..97cec2e60c 100644
---
a/frontend/src/app/dashboard/component/user/list-item/list-item.component.scss
+++
b/frontend/src/app/dashboard/component/user/list-item/list-item.component.scss
@@ -65,6 +65,7 @@
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
+ max-width: 80vh;
}
.resource-name {
diff --git
a/frontend/src/app/dashboard/component/user/list-item/list-item.component.ts
b/frontend/src/app/dashboard/component/user/list-item/list-item.component.ts
index 3463fbcf27..b0d03783d5 100644
--- a/frontend/src/app/dashboard/component/user/list-item/list-item.component.ts
+++ b/frontend/src/app/dashboard/component/user/list-item/list-item.component.ts
@@ -31,6 +31,7 @@ import {
import { UntilDestroy, untilDestroyed } from "@ngneat/until-destroy";
import { NzModalRef, NzModalService } from "ng-zorro-antd/modal";
import { DashboardEntry } from "src/app/dashboard/type/dashboard-entry";
+import { MarkdownDescriptionComponent } from
"../markdown-description/markdown-description.component";
import { ShareAccessComponent } from "../share-access/share-access.component";
import {
DEFAULT_WORKFLOW_NAME,
@@ -68,6 +69,8 @@ export class ListItemComponent implements OnChanges {
@ViewChild("descriptionInput") descriptionInput!: ElementRef;
editingName = false;
editingDescription = false;
+ renderedDescription = "";
+
likeCount: number = 0;
viewCount = 0;
entryLink: string[] = [];
@@ -146,9 +149,23 @@ export class ListItemComponent implements OnChanges {
this.isLiked = this.entry.isLiked;
}
+ private renderMarkdownPreview(text: string | undefined): void {
+ const trimmed = (text ?? "").trim();
+ if (!trimmed) {
+ this.renderedDescription = "";
+ return;
+ }
+ this.renderedDescription = trimmed
+ .replace(/[#*_~`>|]/g, "")
+ .replace(/\[([^\]]*)\]\([^)]*\)/g, "$1") // [text](url) → text
+ .replace(/\s+/g, " ")
+ .trim();
+ }
+
ngOnChanges(changes: SimpleChanges): void {
if (changes["entry"]) {
this.initializeEntry();
+ this.renderMarkdownPreview(this.entry.description);
}
}
@@ -225,16 +242,24 @@ export class ListItemComponent implements OnChanges {
}
onEditDescription(): void {
+ if (!this.editable) return;
+
this.originalDescription = this.entry.description;
- this.editingDescription = true;
- setTimeout(() => {
- if (this.descriptionInput) {
- const textareaElement = this.descriptionInput.nativeElement;
- const valueLength = textareaElement.value.length;
- textareaElement.focus();
- textareaElement.setSelectionRange(valueLength, valueLength);
- }
- }, 0);
+
+ const modalRef = this.modalService.create<MarkdownDescriptionComponent>({
+ nzTitle: "Edit Description",
+ nzContent: MarkdownDescriptionComponent,
+ nzData: {
+ description: this.entry.description ?? "",
+ },
+ nzFooter: null,
+ nzWidth: "800px",
+ });
+
+
modalRef.componentInstance?.descriptionChange.pipe(untilDestroyed(this)).subscribe(desc
=> {
+ this.confirmUpdateCustomDescription(desc);
+ modalRef.destroy();
+ });
}
private updateProperty(
@@ -253,10 +278,16 @@ export class ListItemComponent implements OnChanges {
.subscribe({
next: () => {
this.entry[propertyName] = newValue; // Dynamic property assignment
+ if (propertyName === "description") {
+ this.renderMarkdownPreview(newValue);
+ }
},
error: () => {
this.notificationService.error("Update failed");
(this.entry as any)[propertyName] = originalValue ?? ""; // Fallback
to original value
+ if (propertyName === "description") {
+ this.renderMarkdownPreview(originalValue);
+ }
this.setEditingState(propertyName, false);
},
complete: () => {
diff --git
a/frontend/src/app/dashboard/component/user/markdown-description/markdown-description.component.html
b/frontend/src/app/dashboard/component/user/markdown-description/markdown-description.component.html
new file mode 100644
index 0000000000..b1bfc94d46
--- /dev/null
+++
b/frontend/src/app/dashboard/component/user/markdown-description/markdown-description.component.html
@@ -0,0 +1,77 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!-- Preview mode -->
+<ng-container *ngIf="!isEditing">
+ <div class="preview-box">
+ <div
+ *ngIf="renderedDescription; else noDescription"
+ class="md-rendered"
+ [innerHTML]="renderedDescription"></div>
+ <ng-template #noDescription>
+ <p>No description provided.</p>
+ </ng-template>
+ </div>
+</ng-container>
+
+<!-- Edit mode -->
+<ng-container *ngIf="isEditing">
+ <div class="md-split">
+ <div class="md-left">
+ <div class="md-toolbar">
+ <button
+ *ngFor="let btn of toolbar"
+ nz-button
+ nzType="text"
+ nzSize="small"
+ [nz-tooltip]="btn.tip"
+ (click)="insert(btn)">
+ <i
+ nz-icon
+ [nzType]="btn.icon"></i>
+ </button>
+ </div>
+
+ <textarea
+ #textarea
+ nz-input
+ [(ngModel)]="editingContent"
+ (input)="renderMarkdown(editingContent)"
+ placeholder="Write Markdown here..."
+ class="md-textarea"></textarea>
+ </div>
+
+ <div class="md-right">
+ <div
+ *ngIf="renderedDescription"
+ class="md-rendered"
+ [innerHTML]="renderedDescription"></div>
+ </div>
+ </div>
+
+ <div class="md-actions">
+ <button
+ nz-button
+ nzType="primary"
+ nzSize="small"
+ (click)="save()">
+ Save
+ </button>
+ </div>
+</ng-container>
diff --git
a/frontend/src/app/dashboard/component/user/markdown-description/markdown-description.component.scss
b/frontend/src/app/dashboard/component/user/markdown-description/markdown-description.component.scss
new file mode 100644
index 0000000000..27aad8bc9c
--- /dev/null
+++
b/frontend/src/app/dashboard/component/user/markdown-description/markdown-description.component.scss
@@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.preview-box {
+ position: relative;
+ margin-top: 10px;
+ max-height: 50vh;
+ overflow-y: auto;
+}
+
+.md-actions {
+ display: flex;
+ justify-content: flex-end;
+}
+
+.md-split {
+ display: flex;
+ margin-top: 10px;
+ gap: 16px;
+ margin-bottom: 10px;
+ max-height: 50vh;
+}
+
+.md-left {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+}
+
+.md-toolbar {
+ gap: 2px;
+ padding: 4px 8px;
+ background: #fafafa;
+ border: 1px solid #d9d9d9;
+ border-radius: 4px 4px 0 0;
+}
+
+.md-textarea {
+ flex: 1;
+ min-height: 300px;
+ border-radius: 0 0 4px 4px;
+}
+
+.md-right {
+ flex: 1;
+ overflow-y: auto;
+ padding: 16px;
+ border: 1px solid #e8e8e8;
+ border-radius: 4px;
+}
+
+.md-rendered {
+ ::ng-deep {
+ table {
+ margin: 12px 0;
+ th,
+ td {
+ border: 1px solid #d9d9d9;
+ padding: 8px 12px;
+ }
+ th {
+ background: #fafafa;
+ }
+ }
+
+ blockquote {
+ border-left: 4px solid #1890ff;
+ padding-left: 12px;
+ color: #595959;
+ }
+
+ code {
+ background: #f5f5f5;
+ padding: 2px 4px;
+ border-radius: 3px;
+ }
+ }
+}
diff --git
a/frontend/src/app/dashboard/component/user/markdown-description/markdown-description.component.ts
b/frontend/src/app/dashboard/component/user/markdown-description/markdown-description.component.ts
new file mode 100644
index 0000000000..de4c0a9c84
--- /dev/null
+++
b/frontend/src/app/dashboard/component/user/markdown-description/markdown-description.component.ts
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import {
+ Component,
+ Input,
+ Output,
+ EventEmitter,
+ OnInit,
+ OnChanges,
+ SimpleChanges,
+ ViewChild,
+ ElementRef,
+ inject,
+} from "@angular/core";
+import { NZ_MODAL_DATA } from "ng-zorro-antd/modal";
+import { MarkdownService } from "ngx-markdown";
+
+@Component({
+ selector: "texera-markdown-description",
+ templateUrl: "./markdown-description.component.html",
+ styleUrls: ["./markdown-description.component.scss"],
+})
+export class MarkdownDescriptionComponent implements OnInit, OnChanges {
+ private modalData = inject(NZ_MODAL_DATA, { optional: true });
+
+ @Input() description = "";
+ @Output() descriptionChange = new EventEmitter<string>();
+ @ViewChild("textarea") textareaRef!: ElementRef<HTMLTextAreaElement>;
+
+ isEditing = false;
+ editingContent = "";
+ renderedDescription = "";
+
+ readonly toolbar: { icon: string; tip: string; prefix: string; suffix:
string; default: string }[] = [
+ { icon: "bold", tip: "Bold", prefix: "**", suffix: "**", default: "bold" },
+ { icon: "italic", tip: "Italic", prefix: "_", suffix: "_", default:
"italic" },
+ { icon: "strikethrough", tip: "Strikethrough", prefix: "~~", suffix: "~~",
default: "text" },
+ { icon: "font-size", tip: "Heading", prefix: "### ", suffix: "", default:
"Heading" },
+ { icon: "code", tip: "Code", prefix: "`", suffix: "`", default: "code" },
+ { icon: "block", tip: "Code Block", prefix: "\n```\n", suffix: "\n```\n",
default: "code" },
+ { icon: "minus", tip: "Quote", prefix: "> ", suffix: "", default: "quote"
},
+ { icon: "unordered-list", tip: "Bullet List", prefix: "- ", suffix: "",
default: "item" },
+ { icon: "ordered-list", tip: "Numbered List", prefix: "1. ", suffix: "",
default: "item" },
+ { icon: "link", tip: "Link", prefix: "[", suffix: "](url)", default:
"text" },
+ { icon: "picture", tip: "Image", prefix: "", default:
"alt text" },
+ {
+ icon: "table",
+ tip: "Table",
+ prefix: "\n| Col 1 | Col 2 | Col 3 |\n| --- | --- | --- |\n| ",
+ suffix: " | | |\n",
+ default: "",
+ },
+ { icon: "line", tip: "Divider", prefix: "\n---\n", suffix: "", default: ""
},
+ ];
+
+ constructor(private markdownService: MarkdownService) {}
+ ngOnInit(): void {
+ if (this.modalData) {
+ this.description = this.modalData.description ?? "";
+ this.isEditing = true;
+ }
+ this.editingContent = this.description;
+ this.renderMarkdown(this.description);
+ }
+
+ ngOnChanges(changes: SimpleChanges): void {
+ if (changes["description"] && !changes["description"].firstChange) {
+ if (this.isEditing) {
+ return;
+ }
+ this.editingContent = this.description;
+ this.renderMarkdown(this.description);
+ }
+ }
+
+ save(): void {
+ this.description = this.editingContent;
+ this.descriptionChange.emit(this.description);
+ this.renderMarkdown(this.description);
+ this.isEditing = false;
+ }
+
+ insert(action: { prefix: string; suffix: string; default: string }): void {
+ const textarea = this.textareaRef.nativeElement;
+ const selectionStart = textarea.selectionStart;
+ const selectionEnd = textarea.selectionEnd;
+ const selectedText = this.editingContent.substring(selectionStart,
selectionEnd) || action.default;
+
+ const textBefore = this.editingContent.substring(0, selectionStart);
+ const textAfter = this.editingContent.substring(selectionEnd);
+ this.editingContent = textBefore + action.prefix + selectedText +
action.suffix + textAfter;
+ this.renderMarkdown(this.editingContent);
+
+ requestAnimationFrame(() => textarea.focus());
+ }
+
+ renderMarkdown(text: string): void {
+ this.renderedDescription = text?.trim() ? this.markdownService.parse(text)
: "";
+ }
+}
diff --git
a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.html
b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.html
index 79ced02f86..16397793c6 100644
---
a/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.html
+++
b/frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.html
@@ -32,9 +32,7 @@
</span>
</ng-template>
</nz-card-meta>
- <nz-card-meta
- style="padding-top: 20px"
- nzDescription="{{datasetDescription}}"></nz-card-meta>
+ <texera-markdown-description [description]="datasetDescription">
</texera-markdown-description>
<div
class="workflow-panel"
style="padding-top: 30px">
diff --git
a/frontend/src/app/hub/component/workflow/detail/hub-workflow-detail.component.html
b/frontend/src/app/hub/component/workflow/detail/hub-workflow-detail.component.html
index 2c1d53feec..2d57ff953f 100644
---
a/frontend/src/app/hub/component/workflow/detail/hub-workflow-detail.component.html
+++
b/frontend/src/app/hub/component/workflow/detail/hub-workflow-detail.component.html
@@ -104,7 +104,7 @@
</div>
<div class="workflow-description">
<h2>Description</h2>
- <p>{{workflowDescription}}</p>
+ <texera-markdown-description [description]="workflowDescription">
</texera-markdown-description>
</div>
<h2>Preview</h2>
diff --git a/sql/texera_ddl.sql b/sql/texera_ddl.sql
index 179822b0da..d6b488e582 100644
--- a/sql/texera_ddl.sql
+++ b/sql/texera_ddl.sql
@@ -125,7 +125,7 @@ CREATE TABLE IF NOT EXISTS workflow
(
wid SERIAL PRIMARY KEY,
name VARCHAR(128) NOT NULL,
- description VARCHAR(500),
+ description TEXT,
content TEXT NOT NULL,
creation_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
last_modified_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -251,7 +251,7 @@ CREATE TABLE IF NOT EXISTS dataset
repository_name VARCHAR(128),
is_public BOOLEAN NOT NULL DEFAULT TRUE,
is_downloadable BOOLEAN NOT NULL DEFAULT TRUE,
- description VARCHAR(512) NOT NULL,
+ description TEXT NOT NULL,
creation_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
cover_image varchar(255),
FOREIGN KEY (owner_uid) REFERENCES "user"(uid) ON DELETE CASCADE
diff --git a/sql/updates/22.sql b/sql/updates/22.sql
new file mode 100644
index 0000000000..a04eb022c7
--- /dev/null
+++ b/sql/updates/22.sql
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+\c texera_db
+
+SET search_path TO texera_db;
+
+BEGIN;
+
+-- Change description column from VARCHAR to TEXT to support Markdown content.
+ALTER TABLE dataset
+ALTER COLUMN description TYPE TEXT;
+
+ALTER TABLE workflow
+ALTER COLUMN description TYPE TEXT;
+
+COMMIT;