Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation slightly outdated for drizzle setup #55

Open
ocluf opened this issue Dec 9, 2024 · 1 comment
Open

documentation slightly outdated for drizzle setup #55

ocluf opened this issue Dec 9, 2024 · 1 comment

Comments

@ocluf
Copy link

ocluf commented Dec 9, 2024

Currently following the instructions to use this library with drizzle.

the schema example is:

import { sqliteTable, int, text } from 'drizzle-orm/sqlite-core';

export const groceries = sqliteTable('groceries', {
	id: int('id').primaryKey({ autoIncrement: true }),
	name: text('name').notNull(),
});

But in the latest version of drizzle this gives you a deprecated warning. The new way to do this would be:

export const groceries = sqliteTable(
	'groceries',
	{
		id: int().primaryKey({ autoIncrement: true }),
		name: text().notNull()
	},
	() => []
);

Thanks for writing this library it looks cool!

@DallasHoff
Copy link
Owner

Thanks for the heads-up. Would you mind opening a pull request with these changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants