Changeset 15 for trunk/SQL


Ignore:
Timestamp:
Sep 5, 2019, 9:47:21 AM (5 years ago)
Author:
chronos
Message:
  • Added: Support for storing data for multiple years.
  • Modified: Improved data synchronization to sync data only if they were changed. Checked with hash function agains previous stored value.
Location:
trunk/SQL
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SQL/Structure.sql

    r12 r15  
    44--
    55-- Host: localhost:3306
    6 -- Generation Time: Aug 29, 2019 at 12:02 AM
     6-- Generation Time: Sep 05, 2019 at 09:42 AM
    77-- Server version: 10.3.17-MariaDB-0ubuntu0.19.04.1
    88-- PHP Version: 7.2.19-0ubuntu0.19.04.2
     
    2020-- Database: `teribear`
    2121--
    22 CREATE DATABASE IF NOT EXISTS `teribear` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
    23 USE `teribear`;
     22
     23-- --------------------------------------------------------
     24
     25--
     26-- Table structure for table `Import`
     27--
     28
     29CREATE TABLE `Import` (
     30  `Id` int(11) NOT NULL,
     31  `Time` datetime NOT NULL,
     32  `Hash` varchar(255) NOT NULL,
     33  `ItemCount` int(11) NOT NULL
     34) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
    2435
    2536-- --------------------------------------------------------
     
    3445  `Gender` int(11) NOT NULL,
    3546  `Team` int(11) DEFAULT NULL,
    36   `ChipNumber` int(11) NOT NULL
     47  `ChipNumber` int(11) NOT NULL,
     48  `Year` int(11) NOT NULL
    3749) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
    3850
     
    6274  `Name` varchar(255) NOT NULL,
    6375  `WebId` int(11) NOT NULL,
    64   `IsFamily` int(11) NOT NULL
     76  `IsFamily` int(11) NOT NULL,
     77  `Year` int(11) NOT NULL
    6578) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
    6679
     
    8396-- Indexes for dumped tables
    8497--
     98
     99--
     100-- Indexes for table `Import`
     101--
     102ALTER TABLE `Import`
     103  ADD PRIMARY KEY (`Id`);
    85104
    86105--
     
    116135
    117136--
     137-- AUTO_INCREMENT for table `Import`
     138--
     139ALTER TABLE `Import`
     140  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
     141--
    118142-- AUTO_INCREMENT for table `Runner`
    119143--
    120144ALTER TABLE `Runner`
    121   MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18158;
     145  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31205;
    122146--
    123147-- AUTO_INCREMENT for table `RunnerStat`
    124148--
    125149ALTER TABLE `RunnerStat`
    126   MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=136448;
     150  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=250219;
    127151--
    128152-- AUTO_INCREMENT for table `Team`
     
    134158--
    135159ALTER TABLE `TeamStat`
    136   MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4088;
     160  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=55625;
    137161--
    138162-- Constraints for dumped tables
Note: See TracChangeset for help on using the changeset viewer.