|
@ -25,7 +25,7 @@ namespace db { |
|
|
EOF |
|
|
EOF |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
include="#include \"migrations/$migration.h\"" |
|
|
|
|
|
map_entry="migrations.emplace($epoch, new db::migrations::m$migration());" |
|
|
|
|
|
echo $include |
|
|
|
|
|
echo $map_entry |
|
|
|
|
|
|
|
|
include="#include \\\"migrations/$migration.h\\\"" |
|
|
|
|
|
map_entry=" migrations.emplace($epoch, new db::migrations::m$migration());" |
|
|
|
|
|
gawk -i inplace "FNR==NR{ if (/migrations.emplace/) p=NR; next} 1; FNR==p{ print \"$map_entry\" }" db/Schema.cpp db/Schema.cpp |
|
|
|
|
|
gawk -i inplace "FNR==NR{ if (/#include \"migrations/) p=NR; next} 1; FNR==p{ print \"$include\" }" db/Schema.cpp db/Schema.cpp |