From: Michelle Konzack <linux4michelle@tamay-dogan.net>
To: pgsql-general@lists.postgresql.org
Subject: Scheme conversion MySQL to PGSQL
Date: Sun, 24 Dec 2017 18:52:39 +0100
Message-ID: <491331d0766626e73f6028b0462629fa.squirrel@webmail.tamay-dogan.net> (raw)
Hello *
I try to convert a Database scheme from mySQL to pgSQL and have
problems with the line:
KEY post_date (post_date)
and later probably with the lines
UNIQUE KEY user (stat_login)
and
KEY forum_id (forum_id)
too. How to solv this prolem?
Thanks
Michelle
----8<----------------------------------------------------------------
CREATE TABLE sqmf_forum (
forum_id serial NOT NULL,
forum_name varchar(50) NOT NULL,
forum_description varchar(250) NOT NULL,
forum_visible integer NOT NULL default '0',
display_order integer NOT NULL default '1',
PRIMARY KEY (forum_id)
);
CREATE TABLE sqmf_post (
post_id serial NOT NULL,
thread_id integer NOT NULL,
post_login varchar NOT NULL,
post_date timestamp NOT NULL,
post_content text NOT NULL,
PRIMARY KEY (post_id),
KEY post_date (post_date)
);
CREATE TABLE sqmf_stat (
stat_login varchar(70) NOT NULL,
stat_post integer default '1',
stat_thread integer default '1',
PRIMARY KEY (stat_login),
UNIQUE KEY user (stat_login)
);
CREATE TABLE sqmf_thread (
thread_id serial NOT NULL,
forum_id integer NOT NULL,
thread_login varchar(70) NOT NULL,
thread_date datetime NOT NULL,
thread_title varchar(200) NOT NULL,
thread_content longtext NOT NULL,
nb_view integer NOT NULL default '0',
nb_post integer NOT NULL default '1',
last_post_date datetime NOT NULL,
last_post_login varchar(70) NOT NULL,
PRIMARY KEY (thread_id),
KEY forum_id (forum_id)
);
----8<----------------------------------------------------------------
--
Michelle Konzack
00372-54541400
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: linux4michelle@tamay-dogan.net
Subject: Re: Scheme conversion MySQL to PGSQL
In-Reply-To: <491331d0766626e73f6028b0462629fa.squirrel@webmail.tamay-dogan.net>
References: <491331d0766626e73f6028b0462629fa.squirrel@webmail.tamay-dogan.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox