Created
May 12, 2015 08:23
-
-
Save rod-dot-codes/b754f83b224f9b20e24e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO users | |
SELECT username,password,first_name,last_name,email,is_staff,is_active,facebook_id,twitter_username,mobile_number,dob,receive_sms,receive_email, gender, | |
'ecr',last_login,date_joined,address,city,zipcode,province,about_me | |
FROM dblink('host=127.0.0.1 port=5432 dbname=ecr_live user=postgres password=postgres','SELECT * from auth_user') AS au(id integer, | |
username character varying(30) , | |
first_name character varying(30) , | |
last_name character varying(30) , | |
email character varying(75) , | |
password character varying(128) , | |
is_staff boolean , | |
is_active boolean , | |
is_superuser boolean , | |
last_login timestamp with time zone , | |
date_joined timestamp with time zone ) | |
LEFT JOIN dblink('host=127.0.0.1 port=5432 dbname=ecr_live user=postgres password=postgres','SELECT * from foundry_member') AS fm ( | |
user_ptr_id integer , | |
image character varying(100) , | |
date_taken timestamp with time zone, | |
view_count integer , | |
crop_from character varying(10) , | |
effect_id integer, | |
facebook_id character varying(128), | |
twitter_username character varying(128), | |
mobile_number character varying(64), | |
dob date, | |
about_me text, | |
country_id integer, | |
receive_sms boolean , | |
receive_email boolean , | |
address text, | |
city character varying(256), | |
zipcode character varying(32), | |
province character varying(256), | |
gender character varying(1), | |
is_profile_complete boolean , | |
last_seen timestamp with time zone) | |
on au.id = fm.user_ptr_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment