Seite 1 von 2 12 LetzteLetzte
Ergebnis 1 bis 10 von 13

Thema: MySQL zu PostGreSQL

  1. #1
    Darian ist offline Benutzer
    Registriert seit
    12.02.2007
    Beiträge
    40

    Standard MySQL zu PostGreSQL

    Hallo Leute,

    Ich bin gerade dabei mir eine kleine Homepage für meine Guatemala reise zu bauen, und da brauche ich natürlich auch Bilder.

    Ich benutze phpbb und möchte jetzt folgende Bildergallery installieren:
    http://smartor.is-root.com

    phpbb funktioniert ohne Probleme mit PostGreSQL, und leider habe ich Probleme mit der Bildergallery.

    Nun ein paar Fragen:

    1. Wie gehe ich vor wenn ich es dennoch installieren will?

    2. Wenn ich es schaffe dass ich die Datenbank erstelle, funktioniert dann der Code der Bildergallery?

    3. Wovon hängt das ab?

    Soviel mal dazu, und jetzt noch den SQL Code für Erstellung der DB.

    lg, und würde mich freuen wenn mir jemand helfen kann
    Darian



    PHP-Code:
    CREATE TABLE phpbb_album (
        
    pic_id int(11UNSIGNED NOT NULL auto_increment,
        
    pic_filename varchar(255NOT NULL,
        
    pic_thumbnail varchar(255),
        
    pic_title varchar(255NOT NULL,
        
    pic_desc text,
        
    pic_user_id mediumint(8NOT NULL,
        
    pic_username varchar(32),
        
    pic_user_ip char(8NOT NULL DEFAULT '0',
        
    pic_time int(11UNSIGNED NOT NULL,
        
    pic_cat_id mediumint(8UNSIGNED NOT NULL DEFAULT '1',
        
    pic_view_count int(11UNSIGNED NOT NULL DEFAULT '0',
        
    pic_lock tinyint(3NOT NULL DEFAULT '0',
        
    pic_approval tinyint(3NOT NULL DEFAULT '1',
        
    PRIMARY KEY (pic_id),
        
    KEY pic_cat_id (pic_cat_id),
        
    KEY pic_user_id (pic_user_id),
        
    KEY pic_time (pic_time));

    CREATE TABLE phpbb_album_rate (
        
    rate_pic_id int(11UNSIGNED NOT NULL,
        
    rate_user_id mediumint(8NOT NULL,
        
    rate_user_ip char(8NOT NULL,
        
    rate_point tinyint(3UNSIGNED NOT NULL,
        
    KEY rate_pic_id (rate_pic_id),
        
    KEY rate_user_id (rate_user_id),
        
    KEY rate_user_ip (rate_user_ip),
        
    KEY rate_point (rate_point));

    CREATE TABLE phpbb_album_comment (
        
    comment_id int(11UNSIGNED NOT NULL auto_increment,
        
    comment_pic_id int(11UNSIGNED NOT NULL,
        
    comment_user_id mediumint(8NOT NULL,
        
    comment_username varchar(32),
        
    comment_user_ip char(8NOT NULL,
        
    comment_time int(11UNSIGNED NOT NULL,
        
    comment_text TEXT,
        
    comment_edit_time int(11UNSIGNED,
        
    comment_edit_count smallint(5UNSIGNED NOT NULL DEFAULT '0',
        
    comment_edit_user_id mediumint(8),
        
    PRIMARY KEY(comment_id),
        
    KEY comment_pic_id (comment_pic_id),
        
    KEY comment_user_id (comment_user_id),
        
    KEY comment_user_ip (comment_user_ip),
        
    KEY comment_time (comment_time));

    CREATE TABLE phpbb_album_cat (
        
    cat_id mediumint(8UNSIGNED NOT NULL auto_increment,
        
    cat_title varchar(255NOT NULL,
        
    cat_desc text,
        
    cat_order mediumint(8NOT NULL,
        
    cat_view_level tinyint(3NOT NULL DEFAULT '-1',
        
    cat_upload_level tinyint(3NOT NULL DEFAULT '0',
        
    cat_rate_level tinyint(3NOT NULL DEFAULT '0',
        
    cat_comment_level tinyint(3NOT NULL DEFAULT '0',
        
    cat_edit_level tinyint(3NOT NULL DEFAULT '0',
        
    cat_delete_level tinyint(3NOT NULL DEFAULT '2',
        
    cat_view_groups varchar(255),
        
    cat_upload_groups varchar(255),
        
    cat_rate_groups varchar(255),
        
    cat_comment_groups varchar(255),
        
    cat_edit_groups varchar(255),
        
    cat_delete_groups varchar(255),
        
    cat_moderator_groups varchar(255),
        
    cat_approval tinyint(3NOT NULL DEFAULT '0',
        
    PRIMARY KEY (cat_id),
        
    KEY cat_order (cat_order));

    CREATE TABLE phpbb_album_config (
        
    config_name varchar(255NOT NULL,
        
    config_value varchar(255NOT NULL,
        
    PRIMARY KEY (config_name));

    INSERT INTO phpbb_album_config VALUES ('max_pics''1024');
    INSERT INTO phpbb_album_config VALUES ('user_pics_limit''50');
    INSERT INTO phpbb_album_config VALUES ('mod_pics_limit''250');
    INSERT INTO phpbb_album_config VALUES ('max_file_size''128000');
    INSERT INTO phpbb_album_config VALUES ('max_width''800');
    INSERT INTO phpbb_album_config VALUES ('max_height''600');
    INSERT INTO phpbb_album_config VALUES ('rows_per_page''3');
    INSERT INTO phpbb_album_config VALUES ('cols_per_page''4');
    INSERT INTO phpbb_album_config VALUES ('fullpic_popup''1');
    INSERT INTO phpbb_album_config VALUES ('thumbnail_quality''50');
    INSERT INTO phpbb_album_config VALUES ('thumbnail_size''125');
    INSERT INTO phpbb_album_config VALUES ('thumbnail_cache''1');
    INSERT INTO phpbb_album_config VALUES ('sort_method''pic_time');
    INSERT INTO phpbb_album_config VALUES ('sort_order''DESC');
    INSERT INTO phpbb_album_config VALUES ('jpg_allowed''1');
    INSERT INTO phpbb_album_config VALUES ('png_allowed''1');
    INSERT INTO phpbb_album_config VALUES ('gif_allowed''0');
    INSERT INTO phpbb_album_config VALUES ('desc_length''512');
    INSERT INTO phpbb_album_config VALUES ('hotlink_prevent''0');
    INSERT INTO phpbb_album_config VALUES ('hotlink_allowed''smartor.is-root.com');
    INSERT INTO phpbb_album_config VALUES ('personal_gallery''0');
    INSERT INTO phpbb_album_config VALUES ('personal_gallery_private''0');
    INSERT INTO phpbb_album_config VALUES ('personal_gallery_limit''10');
    INSERT INTO phpbb_album_config VALUES ('personal_gallery_view''-1');
    INSERT INTO phpbb_album_config VALUES ('rate''1');
    INSERT INTO phpbb_album_config VALUES ('rate_scale''10');
    INSERT INTO phpbb_album_config VALUES ('comment''1');
    INSERT INTO phpbb_album_config VALUES ('gd_version''2');
    INSERT INTO phpbb_album_config VALUES ('album_version''.0.55'); 

  2. #2
    akretschmer ist offline Super-Moderator
    Registriert seit
    29.10.2006
    Ort
    Dresden
    Beiträge
    5.471

    Standard

    Zitat Zitat von Darian Beitrag anzeigen
    Hallo Leute,

    Soviel mal dazu, und jetzt noch den SQL Code für Erstellung der DB.
    Ich schreib mal als SQL-Kommentar das rein, was mir erst mal so auffällt.

    PHP-Code:
    CREATE TABLE phpbb_album (
        
    pic_id int(11UNSIGNED NOT NULL auto_increment,
    -- 
    verwende serialnicht auto_dingensdas gibts ned
        pic_filename varchar
    (255NOT NULL,
        
    pic_thumbnail varchar(255),
        
    pic_title varchar(255NOT NULL,
        
    pic_desc text,
        
    pic_user_id mediumint(8NOT NULL,
        
    pic_username varchar(32),
        
    pic_user_ip char(8NOT NULL DEFAULT '0',
    -- 
    für IP-Adressen etcgibt es spezielle Datentypenverwende die lieber
        pic_time int
    (11UNSIGNED NOT NULL,
    -- 
    auch dafür gibt es einen besseren Typtime
        pic_cat_id mediumint
    (8UNSIGNED NOT NULL DEFAULT '1',
        
    pic_view_count int(11UNSIGNED NOT NULL DEFAULT '0',
        
    pic_lock tinyint(3NOT NULL DEFAULT '0',
        
    pic_approval tinyint(3NOT NULL DEFAULT '1',
        
    PRIMARY KEY (pic_id),
        
    KEY pic_cat_id (pic_cat_id),
        
    KEY pic_user_id (pic_user_id),
        
    KEY pic_time (pic_time));

    CREATE TABLE phpbb_album_rate (
        
    rate_pic_id int(11UNSIGNED NOT NULL,
        
    rate_user_id mediumint(8NOT NULL,
        
    rate_user_ip char(8NOT NULL,
    -- 
    wieder flascher Datentyp
        rate_point tinyint
    (3UNSIGNED NOT NULL,
        
    KEY rate_pic_id (rate_pic_id),
        
    KEY rate_user_id (rate_user_id),
        
    KEY rate_user_ip (rate_user_ip),
        
    KEY rate_point (rate_point));

    CREATE TABLE phpbb_album_comment (
        
    comment_id int(11UNSIGNED NOT NULL auto_increment,
        
    comment_pic_id int(11UNSIGNED NOT NULL,
        
    comment_user_id mediumint(8NOT NULL,
        
    comment_username varchar(32),
    -- 
    hast Du eine Tabeller der Userdann brauchst Du ja nur die IDnicht den Namen
        comment_user_ip char
    (8NOT NULL,
    -- 
    sagte ich schondaß es für IP-Adressen einen Datentyp gibt?
        
    comment_time int(11UNSIGNED NOT NULL,
        
    comment_text TEXT,
        
    comment_edit_time int(11UNSIGNED,
    -- 
    wiedertimewobei Du willst wohl eher timestamptz
        comment_edit_count smallint
    (5UNSIGNED NOT NULL DEFAULT '0',
        
    comment_edit_user_id mediumint(8),
        
    PRIMARY KEY(comment_id),
        
    KEY comment_pic_id (comment_pic_id),
        
    KEY comment_user_id (comment_user_id),
        
    KEY comment_user_ip (comment_user_ip),
        
    KEY comment_time (comment_time));

    CREATE TABLE phpbb_album_cat (
        
    cat_id mediumint(8UNSIGNED NOT NULL auto_increment,
    -- 
    serialnicht auto_...
        
    cat_title varchar(255NOT NULL,
        
    cat_desc text,
        
    cat_order mediumint(8NOT NULL,
        
    cat_view_level tinyint(3NOT NULL DEFAULT '-1',
        
    cat_upload_level tinyint(3NOT NULL DEFAULT '0',
        
    cat_rate_level tinyint(3NOT NULL DEFAULT '0',
        
    cat_comment_level tinyint(3NOT NULL DEFAULT '0',
        
    cat_edit_level tinyint(3NOT NULL DEFAULT '0',
        
    cat_delete_level tinyint(3NOT NULL DEFAULT '2',
        
    cat_view_groups varchar(255),
        
    cat_upload_groups varchar(255),
        
    cat_rate_groups varchar(255),
        
    cat_comment_groups varchar(255),
        
    cat_edit_groups varchar(255),
        
    cat_delete_groups varchar(255),
        
    cat_moderator_groups varchar(255),
        
    cat_approval tinyint(3NOT NULL DEFAULT '0',
        
    PRIMARY KEY (cat_id),
        
    KEY cat_order (cat_order));

    CREATE TABLE phpbb_album_config (
        
    config_name varchar(255NOT NULL,
        
    config_value varchar(255NOT NULL,
        
    PRIMARY KEY (config_name));

    INSERT INTO phpbb_album_config VALUES ('max_pics''1024');
    -- 
    du speicherst hier numerische Daten in varchar(255). sehr schlecht.

    INSERT INTO phpbb_album_config VALUES ('user_pics_limit''50');
    INSERT INTO phpbb_album_config VALUES ('mod_pics_limit''250');
    INSERT INTO phpbb_album_config VALUES ('max_file_size''128000');
    INSERT INTO phpbb_album_config VALUES ('max_width''800');
    INSERT INTO phpbb_album_config VALUES ('max_height''600');
    INSERT INTO phpbb_album_config VALUES ('rows_per_page''3');
    INSERT INTO phpbb_album_config VALUES ('cols_per_page''4');
    INSERT INTO phpbb_album_config VALUES ('fullpic_popup''1');
    INSERT INTO phpbb_album_config VALUES ('thumbnail_quality''50');
    INSERT INTO phpbb_album_config VALUES ('thumbnail_size''125');
    INSERT INTO phpbb_album_config VALUES ('thumbnail_cache''1');
    INSERT INTO phpbb_album_config VALUES ('sort_method''pic_time');
    INSERT INTO phpbb_album_config VALUES ('sort_order''DESC');
    INSERT INTO phpbb_album_config VALUES ('jpg_allowed''1');
    INSERT INTO phpbb_album_config VALUES ('png_allowed''1');
    INSERT INTO phpbb_album_config VALUES ('gif_allowed''0');
    INSERT INTO phpbb_album_config VALUES ('desc_length''512');
    INSERT INTO phpbb_album_config VALUES ('hotlink_prevent''0');
    INSERT INTO phpbb_album_config VALUES ('hotlink_allowed''smartor.is-root.com');
    INSERT INTO phpbb_album_config VALUES ('personal_gallery''0');
    INSERT INTO phpbb_album_config VALUES ('personal_gallery_private''0');
    INSERT INTO phpbb_album_config VALUES ('personal_gallery_limit''10');
    INSERT INTO phpbb_album_config VALUES ('personal_gallery_view''-1');
    INSERT INTO phpbb_album_config VALUES ('rate''1');
    INSERT INTO phpbb_album_config VALUES ('rate_scale''10');
    INSERT INTO phpbb_album_config VALUES ('comment''1');
    INSERT INTO phpbb_album_config VALUES ('gd_version''2');
    INSERT INTO phpbb_album_config VALUES ('album_version''.0.55'); 


    [/quote]

    Das dazu. Hab grad nicht viel Zeit, vielleicht sagt da jemand anders noch a bissl mehr...


    Andreas
    --
    ads Das hatte dir akretschmer gestern schon gesagt und siehe da sobald du das machst, funktioniert es ;-)
    https://www.xing.com/profile/Andreas_Kretschmer7

  3. #3
    Darian ist offline Benutzer
    Registriert seit
    12.02.2007
    Beiträge
    40

    Standard

    Super danke, hat mir schon einmal ein bisschen weiter geholfen. Und werde dann wenn es wirklich Sinn macht das alles wohl auf postgresql umbauen.

    Was jetzt noch wirklich wichtig für mich ist, wenn ich da was selber ändere, kann der Coder der Bildergallery dann noch darauf zugreifen? Nicht dass ich mir die Arbeit mache, und es funktioniert dann nix mehr.

    lg und danke bis jetzt
    Darian

  4. #4
    Avatar von progs
    progs ist offline Super-Moderator
    Registriert seit
    26.11.2005
    Ort
    Kulmbach, Bayern, Germany, 108121049209415, Kulmbach
    Beiträge
    185

    Standard

    Wenn die Bildergallery die phpBB-Klassen verwendet, würde ich sagen ja. Da diese als Mod von phpBB ausgeliefert wird, stehen die Chancen auch sehr gut.

    Diesbezüglich solltst Du einmal direkt im phpBB Forum oder im Forum der Gallery nachfragen.

  5. #5
    Darian ist offline Benutzer
    Registriert seit
    12.02.2007
    Beiträge
    40

    Standard

    Hallo Leute,

    ich habe gerade etwas gefunden. Ich glaube da gehört schon einiges verändert.

    http://smartor.is-root.com/viewtopic...ght=postgresql

    Oh, schon langsam finde ich es richtig schade keine mysql Datenbank zu haben. :-) (ist vielleicht das falsche Forum um sowas zu sagen*g*)

    Ok egal, ist wenigstens eine Herausforderung

    lg Darian

  6. #6
    Darian ist offline Benutzer
    Registriert seit
    12.02.2007
    Beiträge
    40

    Standard

    Hallo Leute,

    habe das nun aufgegeben, und begonnen die gallery2 und das phpBB Forum zu verbinden.

    Jetzt möchte ich folgende Tabelle erstellen, was passt da nicht? (bitte um Hilfe)

    Mein zusammen geschustertes PostGreSQL:

    PHP-Code:
    CREATE TABLE phpbb_gallery2 (
    fullPath VARCHAR255 NOT NULL ,
    embedUri VARCHAR255 NOT NULL ,
    g2Uri VARCHAR255 NOT NULL ,
    activeAdminId INT NOT NULL ,
    utf8_translate SMALLINTNOT NULL,
    exportData TEXT NULL
    ); 
    Das von MySQL sah vorhin wie folgt aus:

    PHP-Code:
    CREATE TABLE `phpbb_gallery2` (
    `
    fullPathVARCHAR255 NOT NULL ,
    `
    embedUriVARCHAR255 NOT NULL ,
    `
    g2UriVARCHAR255 NOT NULL ,
    `
    activeAdminIdINT NOT NULL ,
    `
    utf8_translateTINYINTNOT NULL,
    `
    exportDataTEXT NULL
    ); 
    Fehlermeldung:

    PHP-Code:
    SQL Fehler:

    ERROR:  syntax error at or near "("
    LINE 6utf8_translate SMALLINTNOT NULL,
                                   ^

    In der Anweisung:
    CREATE TABLE phpbb_gallery2 (
    fullPath VARCHAR255 NOT NULL ,
    embedUri VARCHAR255 NOT NULL ,
    g2Uri VARCHAR255 NOT NULL ,
    activeAdminId INT NOT NULL ,
    utf8_translate SMALLINTNOT NULL,
    exportData TEXT NULL
    ); 
    Bitte um ein paar Tipps, kann aber nicht mehr soo falsch sein glaube ich.

    lg Darian

    Edit: Habe schon bemerkt dass bei smallint diese da => (1) stören. Kann mir jemand erklären warum?
    Geändert von Darian (15.02.2007 um 19:56 Uhr) Grund: Die Erleuchtung...

  7. #7
    Gisman ist offline Erfahrener Benutzer
    Registriert seit
    20.01.2006
    Ort
    Pfalz
    Beiträge
    792

    Standard

    Zitat Zitat von Darian Beitrag anzeigen
    Edit: Habe schon bemerkt dass bei smallint diese da => (1) stören. Kann mir jemand erklären warum?
    Ich denke mal, der Datentyp smallint enthält bereits eine Angabe über die Grösse und braucht die 1 deswegen nicht.

    Gruß Uwe
    Have a lot of fun!

  8. #8
    Darian ist offline Benutzer
    Registriert seit
    12.02.2007
    Beiträge
    40

    Standard

    Hallo,

    na ja, smallint geht von -32768 bis +32767.

    Integer geht auch von irgendwas nach irgendwas, und kann man auch begrenzen.

    lg Darian

  9. #9
    akretschmer ist offline Super-Moderator
    Registriert seit
    29.10.2006
    Ort
    Dresden
    Beiträge
    5.471

    Standard

    Zitat Zitat von Darian Beitrag anzeigen
    Hallo,

    na ja, smallint geht von -32768 bis +32767.

    Integer geht auch von irgendwas nach irgendwas, und kann man auch begrenzen.

    lg Darian
    Es ging darum:

    Code:
    utf8_translate SMALLINT( 1 )
    Und dieses (1) ist sinnfrei.

    Andreas
    --
    ads Das hatte dir akretschmer gestern schon gesagt und siehe da sobald du das machst, funktioniert es ;-)
    https://www.xing.com/profile/Andreas_Kretschmer7

  10. #10
    Darian ist offline Benutzer
    Registriert seit
    12.02.2007
    Beiträge
    40

    Standard

    Was meinst du mit sinnfrei? :-) Sorry, aber ist mir von der logik noch nicht so ganz klar. :-)

    lg Darian

Seite 1 von 2 12 LetzteLetzte

Ähnliche Themen

  1. PostgreSQL to MySQL
    Von jonlar im Forum Migration
    Antworten: 6
    Letzter Beitrag: 11.05.2009, 08:53
  2. MySQL zu PostGreSQL
    Von SeVeN im Forum Migration
    Antworten: 2
    Letzter Beitrag: 05.03.2008, 11:57
  3. Antworten: 1
    Letzter Beitrag: 04.02.2007, 13:31
  4. mysql -- postgresql
    Von noraa im Forum Migration
    Antworten: 3
    Letzter Beitrag: 22.01.2007, 16:50
  5. PostgreSQL vs MySQL
    Von max im Forum Allgemeines
    Antworten: 2
    Letzter Beitrag: 26.11.2005, 12:28

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

Links: Tobias Bauer - IT- und Funkdienstleistungen   -   Bilderrahmen-kaufen.de - Der Onlineshop für Bilderrahmen & Fotorahmen   -   Funkforum