spc_123 Posted August 24, 2003 Share Posted August 24, 2003 I know of a mysql to postgre conversion, but not the other way around. I have syntax that I\'d like to modify for mysql as follows: *********************************************************************** CREATE SEQUENCE \"users_userid_seq\" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1; -- -- TOC Entry ID 4 (OID 215214) -- -- Name: stocks_stock_id_seq Type: SEQUENCE Owner: postgres -- CREATE SEQUENCE \"stocks_stock_id_seq\" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1; -- -- TOC Entry ID 42 (OID 215216) -- -- Name: stocks Type: TABLE Owner: postgres -- CREATE TABLE \"stocks\" ( \"stock_id\" integer DEFAULT nextval(\'\"stocks_stock_id_seq\"\'::text) NOT NULL, \"userid\" integer NOT NULL, \"symbol\" character varying(4) NOT NULL, Constraint \"stocks_pkey\" Primary Key (\"stock_id\") ************************************************************************ It\'s getting hung on the \"CREATE SEQUENCE.\" Thanks in advance Quote Link to comment Share on other sites More sharing options...
Barand Posted August 26, 2003 Share Posted August 26, 2003 I don\'t know postgresql but it looks as thought it is auto-generating the the next id. Try this in mySQl to get same result : CREATE TABLE `stocks` ( `stock_id` integer NOT NULL auto_increment, `userid` integer NOT NULL, `symbol` varchar(4) NOT NULL, Primary Key (stock_id) ) hth Quote Link to comment Share on other sites More sharing options...
spc_123 Posted August 26, 2003 Author Share Posted August 26, 2003 Thanks for the suggestions...actually, I found that the beta version of issue-tracker has a utility that can convert PostgreSQL to MySQL and back. Seems to work very well...Thanks again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.