Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Seulement 7 tables à l'importation du script

2006-01-31
2013-04-18
  • À l'importation du script, il y a seulement 7 tables qui sont créées.  Seulement les tables exportations, groups, oaiabout, oaiset, roles, series et users.  L'importation des autres tables me donne ce message : cannot create table X errno : 150.  Je vous envoie le fichier project-schema.sql.  J'utilise MySql 4.1, Apache 5.5.15 , j2sdk 1.4.2 sous Windows XP.

    Merci de votre aide
    Steve

    # -----------------------------------------------------------------------
    # dccontributor
    # -----------------------------------------------------------------------
    drop table if exists dccontributor;

    CREATE TABLE dccontributor
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dccoverage
    # -----------------------------------------------------------------------
    drop table if exists dccoverage;

    CREATE TABLE dccoverage
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dccreator
    # -----------------------------------------------------------------------
    drop table if exists dccreator;

    CREATE TABLE dccreator
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dcdate
    # -----------------------------------------------------------------------
    drop table if exists dcdate;

    CREATE TABLE dcdate
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value DATETIME NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dcdescription
    # -----------------------------------------------------------------------
    drop table if exists dcdescription;

    CREATE TABLE dcdescription
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value MEDIUMTEXT NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dcformat
    # -----------------------------------------------------------------------
    drop table if exists dcformat;

    CREATE TABLE dcformat
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dcidentifier
    # -----------------------------------------------------------------------
    drop table if exists dcidentifier;

    CREATE TABLE dcidentifier
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dclanguage
    # -----------------------------------------------------------------------
    drop table if exists dclanguage;

    CREATE TABLE dclanguage
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dcpublisher
    # -----------------------------------------------------------------------
    drop table if exists dcpublisher;

    CREATE TABLE dcpublisher
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dcrelation
    # -----------------------------------------------------------------------
    drop table if exists dcrelation;

    CREATE TABLE dcrelation
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dcrights
    # -----------------------------------------------------------------------
    drop table if exists dcrights;

    CREATE TABLE dcrights
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dcsource
    # -----------------------------------------------------------------------
    drop table if exists dcsource;

    CREATE TABLE dcsource
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dcsubject
    # -----------------------------------------------------------------------
    drop table if exists dcsubject;

    CREATE TABLE dcsubject
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dctitle
    # -----------------------------------------------------------------------
    drop table if exists dctitle;

    CREATE TABLE dctitle
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # dctype
    # -----------------------------------------------------------------------
    drop table if exists dctype;

    CREATE TABLE dctype
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # exportations
    # -----------------------------------------------------------------------
    drop table if exists exportations;

    CREATE TABLE exportations
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        dateStamp DATETIME,
                        description MEDIUMTEXT,
        PRIMARY KEY(oi)
    );

    # -----------------------------------------------------------------------
    # files
    # -----------------------------------------------------------------------
    drop table if exists files;

    CREATE TABLE files
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        dateStamp TIMESTAMP,
                        name VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi)
    );

    # -----------------------------------------------------------------------
    # group_role_user
    # -----------------------------------------------------------------------
    drop table if exists group_role_user;

    CREATE TABLE group_role_user
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        oiUsers INTEGER,
                        oiRoles INTEGER,
                        oiGroups INTEGER,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiGroups) REFERENCES groups (oi),
        FOREIGN KEY (oiRoles) REFERENCES roles (oi),
        FOREIGN KEY (oiUsers) REFERENCES users (oi)
    );

    # -----------------------------------------------------------------------
    # groups
    # -----------------------------------------------------------------------
    drop table if exists groups;

    CREATE TABLE groups
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        name VARCHAR (255) NOT NULL,
                        permission BIT NOT NULL,
                        description MEDIUMTEXT NOT NULL,
                        url VARCHAR (255),
                        image VARCHAR (255),
        PRIMARY KEY(oi),
        UNIQUE (name)
    );

    # -----------------------------------------------------------------------
    # oaiabout
    # -----------------------------------------------------------------------
    drop table if exists oaiabout;

    CREATE TABLE oaiabout
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        value VARCHAR (255),
        PRIMARY KEY(oi)
    );

    # -----------------------------------------------------------------------
    # oaiset
    # -----------------------------------------------------------------------
    drop table if exists oaiset;

    CREATE TABLE oaiset
    (
                        oi VARCHAR (255) NOT NULL,
                        name VARCHAR (255),
                        description MEDIUMTEXT,
                        spec VARCHAR (255) NOT NULL,
        PRIMARY KEY(oi),
        UNIQUE (spec)
    );

    # -----------------------------------------------------------------------
    # roles
    # -----------------------------------------------------------------------
    drop table if exists roles;

    CREATE TABLE roles
    (
                        name VARCHAR (255) NOT NULL,
                        description MEDIUMTEXT,
                                oi INTEGER NOT NULL AUTO_INCREMENT,
        PRIMARY KEY(oi),
        UNIQUE (name)
    );

    # -----------------------------------------------------------------------
    # series
    # -----------------------------------------------------------------------
    drop table if exists series;

    CREATE TABLE series
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        name VARCHAR (255) NOT NULL,
                        description MEDIUMTEXT NOT NULL,
                        oiGroups INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiGroups) REFERENCES groups (oi)
    );

    # -----------------------------------------------------------------------
    # group_subscription
    # -----------------------------------------------------------------------
    drop table if exists group_subscription;

    CREATE TABLE group_subscription
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        oiUsers INTEGER NOT NULL,
                        oiGroups INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiGroups) REFERENCES groups (oi),
        FOREIGN KEY (oiUsers) REFERENCES users (oi)
    );

    # -----------------------------------------------------------------------
    # series_subscription
    # -----------------------------------------------------------------------
    drop table if exists series_subscription;

    CREATE TABLE series_subscription
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        oiUsers INTEGER NOT NULL,
                        oiSeries INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiSeries) REFERENCES series (oi),
        FOREIGN KEY (oiUsers) REFERENCES users (oi)
    );

    # -----------------------------------------------------------------------
    # upload_exportation
    # -----------------------------------------------------------------------
    drop table if exists upload_exportation;

    CREATE TABLE upload_exportation
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        oiUploads INTEGER NOT NULL,
                        oiExportations INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi),
        FOREIGN KEY (oiExportations) REFERENCES exportations (oi)
    );

    # -----------------------------------------------------------------------
    # upload_oaiabout
    # -----------------------------------------------------------------------
    drop table if exists upload_oaiabout;

    CREATE TABLE upload_oaiabout
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        oiOaiabout INTEGER NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi),
        FOREIGN KEY (oiOaiabout) REFERENCES oaiabout (oi)
    );

    # -----------------------------------------------------------------------
    # upload_oaiset
    # -----------------------------------------------------------------------
    drop table if exists upload_oaiset;

    CREATE TABLE upload_oaiset
    (
                        oi VARCHAR (255) NOT NULL,
                        oiOaiset VARCHAR (255) NOT NULL,
                        oiUploads INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiUploads) REFERENCES uploads (oi),
        FOREIGN KEY (oiOaiset) REFERENCES oaiset (oi)
    );

    # -----------------------------------------------------------------------
    # uploads
    # -----------------------------------------------------------------------
    drop table if exists uploads;

    CREATE TABLE uploads
    (
                                oi INTEGER NOT NULL AUTO_INCREMENT,
                        vref INTEGER,
                        dateStamp TIMESTAMP NOT NULL,
                        permission VARCHAR (255) NOT NULL,
                        path VARCHAR (255),
                        oiUsers INTEGER,
                        oiSeries INTEGER NOT NULL,
        PRIMARY KEY(oi),
        FOREIGN KEY (oiSeries) REFERENCES series (oi),
        FOREIGN KEY (oiUsers) REFERENCES users (oi),
        UNIQUE (path, vref)
    );

    # -----------------------------------------------------------------------
    # users
    # -----------------------------------------------------------------------
    drop table if exists users;

    CREATE TABLE users
    (
                        lastName VARCHAR (255),
                        firstName VARCHAR (255),
                        email VARCHAR (255),
                        username VARCHAR (255) NOT NULL,
                        password VARCHAR (255) NOT NULL,
                        locale VARCHAR (255),
                        lastLogin TIMESTAMP,
                        lastMail TIMESTAMP,
                                oi INTEGER NOT NULL AUTO_INCREMENT,
        PRIMARY KEY(oi),
        UNIQUE (username)
    );

     
    • Bonjour,

      Vous pouvez essayer de mettre le type MyIsam par défaut pour votre base de données. Cela peut être fait en reconfigurant MySQL (outil Instance Config Wizard) ou en spécifiant manuellement le type de la table (voir http://dev.mysql.com/doc/refman/4.1/en/myisam-storage-engine.html\).

      Salutations,

      Nicolas

       
    • Merci pour votre réponse rapide, le problème est réglé.

      Félicitations pour votre logiciel,
      Steve