Skip to content

Commit 8772fa0

Browse files
committed
docs: mysql error reference
1 parent 98191d1 commit 8772fa0

File tree

7 files changed

+53
-7
lines changed

7 files changed

+53
-7
lines changed

β€Žcontent/reference/mysql/error/overview.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ title: 'MySQL Error Reference'
44

55
This page lists the common MySQL errors that you may encounter.
66

7-
Complete error list can be found in the [MySQL official documentation](https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html).
7+
Complete error list can be found in the [MySQL official documentation](https://dev.mysql.com/doc/mysql-errors/8.0/en/).

β€Žcontent/reference/mysql/how-to/how-to-alter-table-mysql.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ ALTER TABLE customers
274274

275275
## Common Errors and Solutions
276276

277-
See [MySQL Error Reference](https://dev.mysql.com/doc/mysql-errors/8.0/en/) for a comprehensive list of errors you may encounter. Below are common errors specific to ALTER TABLE operations and their solutions:
277+
See [MySQL Error Reference](/reference/mysql/error/overview/) for a comprehensive list of errors you may encounter. Below are common errors specific to ALTER TABLE operations and their solutions:
278278

279279
### Cannot add foreign key constraint
280280

β€Žcontent/reference/mysql/how-to/how-to-create-table-mysql.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ CREATE TABLE rectangles (
371371

372372
## Common Errors and Solutions
373373

374-
See [MySQL Error Reference](https://www.bytebase.com/reference/mysql/error/overview/) for errors you may encounter.
374+
See [MySQL Error Reference](/reference/mysql/error/overview/) for errors you may encounter.
375375

376376
Here are the most common errors you might face when creating tables and how to solve them:
377377

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import Route from '@/lib/route';
2+
import {
3+
generatePostStaticParams,
4+
generatePostMetadata,
5+
default as DocPage,
6+
} from '@/components/pages/docs/docPage';
7+
8+
const DIR_PATH = `${process.cwd()}/content/reference/mysql/error`;
9+
const FILE_ORIGIN_PATH =
10+
'https://github.com/bytebase/bytebase.com/tree/main/content/reference/mysql/error';
11+
12+
export function generateStaticParams() {
13+
return generatePostStaticParams(DIR_PATH);
14+
}
15+
16+
export default function Page({ params }: { params: { slug: string[] } }) {
17+
return (
18+
<DocPage
19+
params={params}
20+
dirPath={DIR_PATH}
21+
fileOriginPath={FILE_ORIGIN_PATH}
22+
routePath={Route.REFERENCE_MYSQL_ERROR}
23+
/>
24+
);
25+
}
26+
27+
export async function generateMetadata({ params }: { params: { slug: string[] } }) {
28+
return generatePostMetadata({
29+
params,
30+
dirPath: DIR_PATH,
31+
routePath: Route.REFERENCE_MYSQL_ERROR,
32+
});
33+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import DocsLayout from '@/components/pages/docs/layout';
2+
3+
const DIR_PATH = `${process.cwd()}/content/reference/mysql/error`;
4+
5+
export default function DocLayout({ children }: { children: React.ReactNode }) {
6+
return (
7+
<DocsLayout dirPath={DIR_PATH} includeSearch={false}>
8+
{children}
9+
</DocsLayout>
10+
);
11+
}

β€Žsrc/app/[locale]/resources/page.tsxβ€Ž

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@ export default function ResourcesPage() {
2323
<section className="container max-w-[1396px] 2xl:max-w-full">
2424
<div className="grid grid-cols-1 gap-8 lg:grid-cols-3 md:grid-cols-2">
2525
{/* Documentation Card */}
26-
<ResourceCard
27-
title="🐘 Postgres Error Reference"
28-
link="/reference/postgres/error/overview"
29-
/>
3026
<ResourceCard
3127
title="🐘 Postgres How-to Guide"
3228
link="/reference/postgres/how-to/overview"
3329
/>
30+
<ResourceCard
31+
title="🐘 Postgres Error Reference"
32+
link="/reference/postgres/error/overview"
33+
/>
3434
<ResourceCard title="🐬 MySQL How-to Guide" link="/reference/mysql/how-to/overview" />
35+
<ResourceCard title="🐬 MySQL Error Reference" link="/reference/mysql/error/overview" />
3536
<ResourceCard
3637
title="🏠 ClickHouse How-to Guide"
3738
link="/reference/clickhouse/how-to/overview"

β€Žsrc/lib/route.tsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ const Route = {
8484
REFERENCE_POSTGRES_ERROR: '/reference/postgres/error',
8585
REFERENCE_POSTGRES_HOW_TO: '/reference/postgres/how-to',
8686
REFERENCE_CLICKHOUSE_HOW_TO: '/reference/clickhouse/how-to',
87+
REFERENCE_MYSQL_ERROR: '/reference/mysql/error',
8788
REFERENCE_MYSQL_HOW_TO: '/reference/mysql/how-to',
8889
REFERENCE_SPANNER_HOW_TO: '/reference/spanner/how-to',
8990

0 commit comments

Comments
Β (0)