-
Notifications
You must be signed in to change notification settings - Fork 8
/
convert-dump
executable file
·52 lines (48 loc) · 3.21 KB
/
convert-dump
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/perl -w
# This code is a part of Slash, and is released under the GPL.
# Copyright 1997-2002 by Open Source Development Network. See README
# and COPYING for more information, or see http://slashcode.com/.
# $Id$
# Quick script to convert the mysql data to postgresql.
# -Brian
open (FILE, $ARGV[0]) or die "Can not open original\n";
while(<FILE>) {
next if /^#/;
next if /^ /;
next if /^INSERT INTO users/;
print $_;
}
print qq|INSERT INTO users (uid,nickname,realname,passwd,matchname) VALUES (1,'Anonymous Coward','Anonymous Coward','eb399bcaca686f8609137153307eecf1','anonymouscoward');|;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,points,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,posttype,'html'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,maxcommentsize,'4096'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,hardthresh,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,clbig,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,clsmall,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,reparent,'1'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,nosigs,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,commentlimit,'100'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,commentspill,'50'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,commentsort,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,noscores,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,mode,'thread'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,threshold,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,extid,''); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,exaid,''); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,exsect,''); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,exboxes,''); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,maxstories,'30'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,noboxes,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,totalmods,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,bio,''); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,tokens,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,maillist,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,totalcomments,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,lastmmid,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,session_login,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,willing,'1'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,dfid,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,tzcode,'edt'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,noicons,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,light,'0'); |;
print qq| INSERT INTO users_param (uid, name, value) VALUES (1,mylinks,''); |;