Skip to content

Commit 5cb04c1

Browse files
committed
🎨 update: replace warning and tip syntax with consistent format
1 parent 23a6b35 commit 5cb04c1

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

docs/advanced/migrations.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ Then go to `migrations\env.py` to finish the alembic configuration.
121121
# Code below omitted 👇
122122
```
123123

124-
!!! warning
124+
/// warning
125125
First import your models and then import SQLModel otherwise sqlmodel doesn´t recognize all models.
126126

127+
///
128+
127129
- Then set your database url
128130

129131
```Python hl_lines="4-4"
@@ -134,8 +136,9 @@ Then go to `migrations\env.py` to finish the alembic configuration.
134136
# Code below omitted 👇
135137
```
136138

137-
!!! tip
139+
/// tip
138140
This step can be replaced setting the same `sqlalchemy.url` variable in `alembic.ini` file.
141+
///
139142

140143
- Finally set `target_metadata` with your `SQLModel.metada`
141144

@@ -175,18 +178,22 @@ Generating migrations\versions\34abfb7ac266_init_db.py ... done
175178

176179
Now in `versions` folder we have a new file called `34abfb7ac266_init_db.py`
177180

178-
!!! info
181+
/// info
179182
This file has a revision id and the message part from our revision command.
180183

184+
///
185+
181186
```{ .python .annotate }
182187
{!./docs_src/advanced/migrations/tutorial005.py!}
183188
```
184189

185190
{!./docs_src/advanced/migrations/annotations/en/tutorial005.md!}
186191

187-
!!! success
192+
/// success
188193
At this moment we have all the files to create our new database model.
189194

195+
///
196+
190197
Initialize the database:
191198

192199
<div class="termy">
@@ -287,9 +294,11 @@ The new file `b39b8d3c77f0_new_field_power.py`:
287294

288295
{!./docs_src/advanced/migrations/annotations/en/tutorial007.md!}
289296

290-
!!! note
297+
/// note
291298
Run `alembic upgrade head` to add the new field named power
292299

300+
///
301+
293302
<div class="termy">
294303

295304
```console
@@ -302,9 +311,11 @@ INFO [alembic.runtime.migration] Running upgrade 357d6ebcfadf -> b39b8d3c77f0,
302311

303312
</div>
304313

305-
!!! note
314+
/// note
306315
After you can downgrade the database to the previous version, run `alembic downgrade -1`
307316

317+
///
318+
308319
<div class="termy">
309320

310321
```console
@@ -317,5 +328,7 @@ INFO [alembic.runtime.migration] Running downgrade b39b8d3c77f0 -> 357d6ebcfadf
317328

318329
</div>
319330

320-
!!! success
331+
/// success
321332
Migrations complete!!! Try adding new tables and relationship.
333+
334+
///

0 commit comments

Comments
 (0)