Skip to content
Snippets Groups Projects
Commit 4b65446f authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Removed prefix.sh script. No longer needed thanks to the installer.

parent 766e6494
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
#!/bin/sh
# $Id$
if [ $# != 2 ]; then
cat >&2 << EOH
This is Drupal database prefixer.
Usage:
$0 prefix original_db.sql >prefixed_db.sql
- all tables will prefixed with 'prefix'
EOH
exit 1;
fi
PREFIX=$1;
sed "s/^CREATE TABLE /CREATE TABLE $PREFIX/;
s/^INSERT INTO /INSERT INTO $PREFIX/;
s/^REPLACE /REPLACE $PREFIX/;
s/^ALTER TABLE /ALTER TABLE $PREFIX/;
s/^CREATE SEQUENCE /CREATE SEQUENCE $PREFIX/;
s/^ALTER SEQUENCE /ALTER SEQUENCE $PREFIX/;
s/^CREATE INDEX \(.*\) ON /CREATE INDEX $PREFIX\\1 ON $PREFIX/;
s/^CREATE UNIQUE INDEX \(.*\) ON /CREATE UNIQUE INDEX $PREFIX\\1 ON $PREFIX/;
s/^UPDATE \(.*\) SET /UPDATE $PREFIX\\1 SET /;
s/^DROP TABLE IF EXISTS /DROP TABLE IF EXISTS $PREFIX/;
s/ DEFAULT nextval('/ DEFAULT nextval('$PREFIX/;
" $2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment