Zum Inhalt springen

Probleme bei extension installation (create table)

Erstellt am 7. September 2011 · 2 Antworten · letzte Antwort am 8. September 2011

Tags: Frage

MrX ·

hi,

ich habe eine Tabellen Struktur aus einem anderen CMS uebernommen und wuerde diese jetzt gerne in Typo nutzen. ist soweit uch Problemlos moeglich, allerdings bekomme ich bei der installation immer die folgende Anzeige:

Tabellen hinzufügen
	CREATE TABLE IF (
dev_id int(11) NOT NULL,
dev_name varchar(128-) NOT NULL,
dev_description text NOT NULL,
dev_link varchar(128-) NOT NULL,
file_id int(11) NOT NULL,
gid int(11) NOT NULL AUTO_INCREMENT,
version varchar(20) NOT NULL,
uploaddate timestamp NOT NULL default CURRENT_TIMESTAMP,
downloads int(11) NOT NULL,
license_id int(11) NOT NULL,
price float NOT NULL,
currency_id int(11) NOT NULL,
picture_path varchar(64) NOT NULL,
title text NOT NULL,
description text NOT NULL,
file_location varchar(128-) NOT NULL,
file_to_lang_id int(11) NOT NULL AUTO_INCREMENT,
lang_id int(11) NOT NULL,
file_to_os_id int(11) NOT NULL AUTO_INCREMENT,
os_id int(11) NOT NULL AUTO_INCREMENT,
group_name text NOT NULL,
group_description text NOT NULL,
group_picture varchar(64) NOT NULL,
pid int(11) NOT NULL default '0',
license_name text NOT NULL,
license_link text NOT NULL,
license_description text NOT NULL,
os_name text NOT NULL,
os_link text NOT NULL,
os_picture varchar(64) NOT NULL,
os_description text NOT NULL,
PRIMARY KEY (gid),
UNIQUE dev_id (dev_id),
UNIQUE file_id (file_id),
UNIQUE file_to_lang_id (file_to_lang_id),
UNIQUE file_to_os_id (file_to_os_id),
UNIQUE gid (gid),
UNIQUE license_id (license_id),
UNIQUE os_id (os_id)
) ENGINE=InnoDB;

Innhalt der ext_tables.sql:

-- phpMyAdmin SQL Dump
-- version 3.4.1
-- http://www.phpmyadmin.net
--
-- Host: vsql00
-- Erstellungszeit: 07. Sep 2011 um 12:52
-- Server Version: 5.1.57
-- PHP-Version: 5.3.8-1~dotdeb.1

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

--
-- Datenbank: `vnr_typo3_dev`
--

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `tx_ftmtf_developer`
--

CREATE TABLE IF NOT EXISTS `tx_ftmtf_developer` (
  `dev_id` int(11) NOT NULL AUTO_INCREMENT,
  `dev_name` varchar(128-) NOT NULL,
  `dev_description` text NOT NULL,
  `dev_link` varchar(128-) NOT NULL,
  PRIMARY KEY (`dev_id`),
  UNIQUE KEY `dev_id` (`dev_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `tx_ftmtf_files`
--

CREATE TABLE IF NOT EXISTS `tx_ftmtf_files` (
  `file_id` int(11) NOT NULL AUTO_INCREMENT,
  `gid` int(11) NOT NULL DEFAULT '0',
  `dev_id` int(11) NOT NULL,
  `version` varchar(20) NOT NULL,
  `uploaddate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `downloads` int(11) NOT NULL,
  `license_id` int(11) NOT NULL,
  `price` float NOT NULL,
  `currency_id` int(11) NOT NULL,
  `picture_path` varchar(64) NOT NULL,
  `title` text NOT NULL,
  `description` text NOT NULL,
  `file_location` varchar(128-) NOT NULL,
  UNIQUE KEY `file_id` (`file_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `tx_ftmtf_file_to_langid`
--

CREATE TABLE IF NOT EXISTS `tx_ftmtf_file_to_langid` (
  `file_to_lang_id` int(11) NOT NULL AUTO_INCREMENT,
  `lang_id` int(11) NOT NULL,
  `file_id` int(11) NOT NULL,
  PRIMARY KEY (`file_to_lang_id`),
  UNIQUE KEY `file_to_lang_id` (`file_to_lang_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `tx_ftmtf_file_to_os_id`
--

CREATE TABLE IF NOT EXISTS `tx_ftmtf_file_to_os_id` (
  `file_to_os_id` int(11) NOT NULL AUTO_INCREMENT,
  `os_id` int(11) NOT NULL,
  `file_id` int(11) NOT NULL,
  UNIQUE KEY `file_to_os_id` (`file_to_os_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `tx_ftmtf_groups`
--

CREATE TABLE IF NOT EXISTS `tx_ftmtf_groups` (
  `gid` int(11) NOT NULL AUTO_INCREMENT,
  `group_name` text NOT NULL,
  `group_description` text NOT NULL,
  `group_picture` varchar(64) NOT NULL,
  `pid` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`gid`),
  UNIQUE KEY `gid` (`gid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `tx_ftmtf_license`
--

CREATE TABLE IF NOT EXISTS `tx_ftmtf_license` (
  `license_id` int(11) NOT NULL AUTO_INCREMENT,
  `license_name` text NOT NULL,
  `license_link` text NOT NULL,
  `license_description` text NOT NULL,
  UNIQUE KEY `license_id` (`license_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `tx_ftmtf_os`
--

CREATE TABLE IF NOT EXISTS `tx_ftmtf_os` (
  `os_id` int(11) NOT NULL AUTO_INCREMENT,
  `os_name` text NOT NULL,
  `os_link` text NOT NULL,
  `license_id` int(11) NOT NULL,
  `os_picture` varchar(64) NOT NULL,
  `os_description` text NOT NULL,
  UNIQUE KEY `os_id` (`os_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

Ausserdem kann ich keine Dumps und Sicherungen erstellen die Meldung im Backende: "IF Ist nicht vorhanden."

Woran kann das liegen?

Julian.​Hofmann ·

Hallo.

Von TYPO3 wird die ext_tables.sql nicht 1:1 an die DB weitergegeben, sondern erst etwas interpretiert. Das "IF NOT EXISTS" kannst Du Dir daher sparen. TYPO3 erkennt, was schon da ist, und ergänzt ggf. nur die Änderungen.

Das "IF NOT EXISTS" dürfte auch der Grund sein, weshalb hier etwas ins Stolpern gerät.

Viele Grüße
Julian

MrX ·
Julian.Hofmann schrieb

Hallo.

Von TYPO3 wird die ext_tables.sql nicht 1:1 an die DB weitergegeben, sondern erst etwas interpretiert. Das "IF NOT EXISTS" kannst Du Dir daher sparen. TYPO3 erkennt, was schon da ist, und ergänzt ggf. nur die Änderungen.

Das "IF NOT EXISTS" dürfte auch der Grund sein, weshalb hier etwas ins Stolpern gerät.

Viele Grüße
Julian

Danke. Hat geholfen nur bekomme ich jetzt immer die Aufforderung ein update zu machen.

ALTER TABLE tx_ftmtf_os CHANGE license_id license_id int(11) default NULL;
Current value: int(11) default ''
	
ALTER TABLE tx_ftmtf_os CHANGE os_picture os_picture varchar(64) default NULL;
Current value: varchar(64) default ''

Orginalcode:
  `license_id` int(11) DEFAULT NULL,
  `os_picture` varchar(64) DEFAULT NULL,

Woran liegt das? Ich hab schon versucht die Gross / Kleinschreibung zu andern, das NOT NULL zu entfernen und "default" in jeder Zeile anzuhangen. Hilft nicht.