Skip to content

Commit af436bf

Browse files
authored
Merge pull request supabase#6284 from burmecia/docs/local-dev-error
docs/fix error in local dev doc example
2 parents a45a811 + c8a4ac3 commit af436bf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

web/docs/guides/local-development.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Open the Studio, navigate to the "SQL Editor" section, and run the following SQL
143143

144144
```sql
145145
create table employees (
146-
id serial primary key,
146+
id integer primary key generated always as identity,
147147
name text
148148
);
149149
```
@@ -154,17 +154,17 @@ Now we have the `employees` table in the local database, but how do we incorpora
154154
supabase db commit create_employees
155155
```
156156

157-
This creates a new migration named `<timestamp>_create_employees.sql`, representing any changes we've made to the local database since `supabase start`.
157+
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`.
158158

159159
Let's add some sample data into the table. We can use the seed script in `supabase/seed.sql`.
160160

161161
```sql
162162
-- in supabase/seed.sql
163-
insert into employees (id, name)
163+
insert into employees (name)
164164
values
165-
(1, 'Erlich Backman'),
166-
(2, 'Richard Hendricks'),
167-
(3, 'Monica Hall');
165+
('Erlich Backman'),
166+
('Richard Hendricks'),
167+
('Monica Hall');
168168
```
169169

170170
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`.
180180
If you run any SQL on the local database that you want to revert, you can use the `reset` command.
181181

182182
```sql
183-
-- run on local database
183+
-- run on local database to make a change
184184
alter table employees
185185
add department text default 'Hooli';
186186
```

0 commit comments

Comments
 (0)