Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix error in local dev doc example

Bo Luc8a4ac3fe0cd
diff --git a/web/docs/guides/local-development.mdx b/web/docs/guides/local-development.mdx
index 72b3d8e425b..1c7af5b8502 100644
--- a/web/docs/guides/local-development.mdx
+++ b/web/docs/guides/local-development.mdx
@@ -143,7 +143,7 @@ Open the Studio, navigate to the "SQL Editor" section, and run the following SQL
```sql
create table employees (
- id serial primary key,
+ id integer primary key generated always as identity,
name text
);
```
@@ -154,17 +154,17 @@ Now we have the `employees` table in the local database, but how do we incorpora
supabase db commit create_employees
```
-This creates a new migration named `<timestamp>_create_employees.sql`, representing any changes we've made to the local database since `supabase start`.
+This creates a new migration named `supabase/migrations/<timestamp>_create_employees.sql`, representing any changes we've made to the local database since `supabase start`.
Let's add some sample data into the table. We can use the seed script in `supabase/seed.sql`.
```sql
-- in supabase/seed.sql
-insert into employees (id, name)
+insert into employees (name)
values
- (1, 'Erlich Backman'),
- (2, 'Richard Hendricks'),
- (3, 'Monica Hall');
+ ('Erlich Backman'),
+ ('Richard Hendricks'),
+ ('Monica Hall');
```
Now run the following to rerun the migration scripts and the seed script:
@@ -180,7 +180,7 @@ If you look again within Studio, you should now see the contents of `employees`.
If you run any SQL on the local database that you want to revert, you can use the `reset` command.
```sql
--- run on local database
+-- run on local database to make a change
alter table employees
add department text default 'Hooli';
```