Skip to content

Commit

Permalink
Fixing Data Insertion Type Mismatch in Astro DB Table Definitions wit…
Browse files Browse the repository at this point in the history
  • Loading branch information
suzulang committed Apr 7, 2024
1 parent 6eb2d63 commit 914322e
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
14 changes: 7 additions & 7 deletions src/content/docs/en/guides/astro-db.mdx
Expand Up @@ -65,7 +65,7 @@ import { defineDb, defineTable, column } from 'astro:db';

const Comment = defineTable({
columns: {
author: column.text(),
authorId: column.number(),
body: column.text(),
}
})
Expand All @@ -87,7 +87,7 @@ import { defineTable, column } from 'astro:db';
const Comment = defineTable({
columns: {
// A string of text.
author: column.text(),
authorId: column.number(),
// A whole integer value.
likes: column.number(),
// A true or false value.
Expand Down Expand Up @@ -422,7 +422,7 @@ The following example renames a table from `Comment` to `Feedback`:
const Comment = defineTable({
deprecated: true,
columns: {
author: column.text(),
authorId: column.number(),
body: column.text(),
}
});
Expand All @@ -434,14 +434,14 @@ The following example renames a table from `Comment` to `Feedback`:
const Comment = defineTable({
deprecated: true,
columns: {
author: column.text(),
authorId: column.number(),
body: column.text(),
}
});

const Feedback = defineTable({
columns: {
author: column.text(),
authorId: column.number(),
body: column.text(),
}
});
Expand All @@ -453,14 +453,14 @@ The following example renames a table from `Comment` to `Feedback`:
const Comment = defineTable({
deprecated: true,
columns: {
author: column.text(),
authorId: column.number(),
body: column.text(),
}
});

const Feedback = defineTable({
columns: {
author: column.text(),
authorId: column.number(),
body: column.text(),
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/integrations-guide/db.mdx
Expand Up @@ -104,7 +104,7 @@ import { defineTable, column, NOW } from 'astro:db';
const Comment = defineTable({
columns: {
id: column.number({ primaryKey: true }),
author: column.text(),
authorId: column.number(),
content: column.text({ optional: true }),
published: column.date({ default: NOW }),
},
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/es/guides/integrations-guide/db.mdx
Expand Up @@ -104,7 +104,7 @@ import { defineTable, column, NOW } from 'astro:db';
const Comment = defineTable({
columns: {
id: column.number({ primaryKey: true }),
author: column.text(),
authorId: column.number(),
content: column.text({ optional: true }),
published: column.date({ default: NOW }),
},
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/ja/guides/astro-db.mdx
Expand Up @@ -64,7 +64,7 @@ import { defineDb, defineTable, column } from 'astro:db';

const Comment = defineTable({
columns: {
author: column.text(),
authorId: column.number(),
body: column.text(),
}
})
Expand All @@ -86,7 +86,7 @@ import { defineTable, column } from 'astro:db';
const Comment = defineTable({
columns: {
// テキストの文字列。
author: column.text(),
authorId: column.number(),
// 整数値。
likes: column.number(),
// 真偽値。
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/ko/guides/astro-db.mdx
Expand Up @@ -64,7 +64,7 @@ import { defineDb, defineTable, column } from 'astro:db';

const Comment = defineTable({
columns: {
author: column.text(),
authorId: column.number(),
body: column.text(),
}
})
Expand All @@ -86,7 +86,7 @@ import { defineTable, column } from 'astro:db';
const Comment = defineTable({
columns: {
// 텍스트 문자열입니다.
author: column.text(),
authorId: column.number(),
// 정수 값입니다.
likes: column.number(),
// 참 또는 거짓 값입니다.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ko/guides/integrations-guide/db.mdx
Expand Up @@ -103,7 +103,7 @@ import { defineTable, column, NOW } from 'astro:db';
const Comment = defineTable({
columns: {
id: column.number({ primaryKey: true }),
author: column.text(),
authorId: column.number(),
content: column.text({ optional: true }),
published: column.date({ default: NOW }),
},
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/ru/guides/astro-db.mdx
Expand Up @@ -64,7 +64,7 @@ import { defineDb, defineTable, column } from 'astro:db';

const Comment = defineTable({
columns: {
author: column.text(),
authorId: column.number(),
body: column.text(),
}
})
Expand All @@ -86,7 +86,7 @@ import { defineTable, column } from 'astro:db';
const Comment = defineTable({
columns: {
// Строка текста.
author: column.text(),
authorId: column.number(),
// Целочисленное значение.
likes: column.number(),
// Значение true или false.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/ru/guides/integrations-guide/db.mdx
Expand Up @@ -104,7 +104,7 @@ import { defineTable, column, NOW } from 'astro:db';
const Comment = defineTable({
columns: {
id: column.number({ primaryKey: true }),
author: column.text(),
authorId: column.number(),
content: column.text({ optional: true }),
published: column.date({ default: NOW }),
},
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/zh-cn/guides/astro-db.mdx
Expand Up @@ -66,7 +66,7 @@ import { defineDb, defineTable, column } from 'astro:db';

const Comment = defineTable({
columns: {
author: column.text(),
authorId: column.number(),
body: column.text(),
}
})
Expand All @@ -88,7 +88,7 @@ import { defineTable, column } from 'astro:db';
const Comment = defineTable({
columns: {
// A string of text.
author: column.text(),
authorId: column.number(),
// A whole integer value.
likes: column.number(),
// A true or false value.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/zh-cn/guides/integrations-guide/db.mdx
Expand Up @@ -104,7 +104,7 @@ import { defineTable, column, NOW } from 'astro:db';
const Comment = defineTable({
columns: {
id: column.number({ primaryKey: true }),
author: column.text(),
authorId: column.number(),
content: column.text({ optional: true }),
published: column.date({ default: NOW }),
},
Expand Down

0 comments on commit 914322e

Please sign in to comment.