Ignore:
Timestamp:
Oct 4, 2012, 2:06:55 PM (12 years ago)
Author:
chronos
Message:
  • Přidáno: Kostra modulů IS a Portal. TWebSession je nutno oddělit z UCore.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Network/UModuleNetwork.pas

    r101 r102  
    8181    '  PRIMARY KEY (`Id`)' +
    8282    ') ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1; ');
     83
     84    Core.CommonDatabase.Query(DbRows,
     85    'CREATE TABLE IF NOT EXISTS `NetworkDevice` (' +
     86    '  `Id` int(11) NOT NULL AUTO_INCREMENT,' +
     87    '  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
     88    '  `Member` int(11) NOT NULL COMMENT "Member",' +
     89    '  `Location` int(11) NOT NULL COMMENT "Member",' +
     90    '  `Type` int(11) NOT NULL COMMENT "NetworkDeviceType",' +
     91    '  `PositionLatitude` double NOT NULL DEFAULT "0",' +
     92    '  `PositionLongitude` double NOT NULL DEFAULT "0",' +
     93    '  `Used` int(11) NOT NULL DEFAULT "1",' +
     94    '  `Online` int(11) NOT NULL DEFAULT "0",' +
     95    '  `LastOnline` datetime NOT NULL,' +
     96    '  `PermanentOnline` int(11) NOT NULL DEFAULT "0",' +
     97    '  `InboundNATPriority` int(11) NOT NULL DEFAULT "1",' +
     98    '  PRIMARY KEY (`Id`),' +
     99    '  UNIQUE KEY `Name` (`Name`),' +
     100    '  KEY `Member` (`Member`),' +
     101    '  KEY `Location` (`Location`),' +
     102    '  KEY `Type` (`Type`)' +
     103    ') ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;');
     104
     105    Core.CommonDatabase.Query(DbRows,
     106    'CREATE TABLE IF NOT EXISTS `NetworkInterface` (' +
     107    '  `Id` int(11) NOT NULL AUTO_INCREMENT,' +
     108    '  `Name` varchar(16) COLLATE utf8_czech_ci NOT NULL,' +
     109    '  `Type` int(11) NOT NULL,' +
     110    '  `MAC` varchar(17) COLLATE utf8_czech_ci NOT NULL,' +
     111    '  `LocalIP` varchar(16) COLLATE utf8_czech_ci NOT NULL,' +
     112    '  `IPv6` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
     113    '  `ExternalIP` varchar(16) COLLATE utf8_czech_ci NOT NULL,' +
     114    '  `Device` int(11) NOT NULL,' +
     115    '  `Online` int(11) NOT NULL DEFAULT "0",' +
     116    '  `LastOnline` datetime NOT NULL,' +
     117    '  PRIMARY KEY (`Id`),' +
     118    '  KEY `Device` (`Device`),' +
     119    '  KEY `Type` (`Type`)' +
     120    ') ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;');
     121
     122    Core.CommonDatabase.Query(DbRows,
     123    'CREATE TABLE IF NOT EXISTS `NetworkInterfaceType` (' +
     124    '  `Id` int(11) NOT NULL AUTO_INCREMENT,' +
     125    '  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
     126    '  `MaxSpeed` int(11) NOT NULL,' +
     127    '  `FullDuplex` int(11) NOT NULL DEFAULT "1",' +
     128    '  `Color` varchar(6) COLLATE utf8_czech_ci NOT NULL DEFAULT "ffffff",' +
     129    '  PRIMARY KEY (`Id`)' +
     130    ') ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;');
     131
     132    Core.CommonDatabase.Query(DbRows,
     133    'CREATE TABLE IF NOT EXISTS `NetworkDeviceType` (' +
     134    '  `Id` int(11) NOT NULL AUTO_INCREMENT,' +
     135    '  `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
     136    '  `ShowOnline` int(11) NOT NULL DEFAULT "0",' +
     137    '  `IconName` varchar(255) COLLATE utf8_czech_ci NOT NULL,' +
     138    '  PRIMARY KEY (`Id`)' +
     139    ') ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;');
     140
    83141  finally
    84142    Data.Free;
     
    95153  try
    96154    DbRows := TDbRows.Create;
     155    Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `NetworkInterfaceType`');
     156    Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `NetworkInterface`');
     157    Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `NetworkDeviceType`');
     158    Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `NetworkDevice`');
    97159    Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `NetworkConfiguration`');
    98160  finally
Note: See TracChangeset for help on using the changeset viewer.