Hello, I started working on migrating tables to mysql.

Data types conversion looks like this:

varchar2 -> varchar
number -> numeric
date -> timestamp

Following problems emerged:
1. Mysql doesn`t support user defined data type. So I have no idea what to
do with evr_t.

2. Mysql doesn`t support nested tables. For example something like "create
or replace type channel_name_t as table of varchar(64)". Does anyone know
some workaround?

3. Check constraint not working. According to mysql documentation - "The
CHECK clause is parsed but ignored by all storage engines".
Workaround: Use before-insert-or-update trigger to implement check
constraint.

4. Create table test(date1 date default (sysdate), date2 date default
(sysdate)) will not work in mysql, because there can be only one date column
with default clause.
Workaround: Use before-insert-or-update trigger to set actual date(s).

5. Missing sequence in mysql.
Workaround: One option is to use AUTO_INCREMENT and LAST_INSERT_ID().
Another option is to create table holding sequence number and create
procedures curval('seq_name') and nextval('seq_name').

Comments are welcome.
Matej Hasul
_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to