i mean complete database consist of tables staff, department , etc etc...all of them already in postgresql...or actually in sql command because i create the table using the command eg:
create table dept
( deptid varchar(20) primary key,
deptname varchar(50) );
etc, but i found out, using openacs the command for the table is slightly different, eg :
begin
acs_object_type.create_type (
supertype => 'acs_object',
object_type => 'note',
pretty_name => 'Note',
pretty_plural => 'Notes',
table_name => 'NOTES',
id_column => 'NOTE_ID'
);
end;
/
show errors;
declare
attr_id acs_attributes.attribute_id%TYPE;
begin
attr_id := acs_attribute.create_attribute (
object_type => 'note',
attribute_name => 'TITLE',
pretty_name => 'Title',
pretty_plural => 'Titles',
datatype => 'string'
);
attr_id := acs_attribute.create_attribute (
object_type => 'note',
attribute_name => 'BODY',
pretty_name => 'Body',
pretty_plural => 'Bodies',
datatype => 'string'
);
end;
/
show errors;
create table notes (
note_id integer references acs_objects(object_id) primary key,
owner_id integer references users(user_id),
title varchar(255) not null,
body varchar(1024)
)
so how do i convert the command for the existing tables so that i can use the tables for my openacs application.
the existing tables are about 50 tables..it is difficult if i have to convert it manually one by one, do you have any program to convert the tables?
thank u!!