12 lines
297 B
Python
12 lines
297 B
Python
from pathlib import Path
|
|
import sys
|
|
|
|
|
|
path = Path(sys.argv[1])
|
|
lines = path.read_text().splitlines()
|
|
lines[0:1] = [
|
|
"import type { MigrateUpArgs, MigrateDownArgs } from '@payloadcms/db-postgres'",
|
|
"import { sql } from '@payloadcms/db-postgres'",
|
|
]
|
|
path.write_text("\n".join(lines) + "\n")
|