withastro/astro
withastro/astro
Activity
Last release
Open issues
Open PRs
License
release notes
release notes
Published 8/8/2025
Contains new features#14190 438adab Thanks @Adammatthiesen! - Adds support for enum support for text columns in Astro DB tables.
import { column, defineTable } from 'astro:db';
// Table definition
const UserTable = defineTable({
columns: {
id: column.number({ primaryKey: true }),
name: column.text(),
rank: column.text({ enum: ['user', 'mod', 'admin'] }),
},
});
// Resulting type definition
type UserTableInferInsert = {
id: string;
name: string;
rank: 'user' | 'mod' | 'admin';
};
release notes
Published 8/8/2025
Contains new features#14190 438adab Thanks @Adammatthiesen! - Adds support for enum support for text columns in Astro DB tables.
import { column, defineTable } from 'astro:db';
// Table definition
const UserTable = defineTable({
columns: {
id: column.number({ primaryKey: true }),
name: column.text(),
rank: column.text({ enum: ['user', 'mod', 'admin'] }),
},
});
// Resulting type definition
type UserTableInferInsert = {
id: string;
name: string;
rank: 'user' | 'mod' | 'admin';
};
The web framework for content-driven websites. ⭐️ Star to support our work!