-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.sql
More file actions
136 lines (109 loc) · 3.6 KB
/
Copy pathgame.sql
File metadata and controls
136 lines (109 loc) · 3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 16, 2013 at 09:16 AM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `game`
--
-- --------------------------------------------------------
--
-- Table structure for table `club`
--
CREATE TABLE IF NOT EXISTS `club` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(125) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`age` int(4) DEFAULT NULL,
PRIMARY KEY (`ID`),
KEY `ID` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=5 ;
--
-- Dumping data for table `club`
--
INSERT INTO `club` (`ID`, `name`, `age`) VALUES
(1, 'testClub1', 12),
(2, 'testClub2', 32),
(3, 'testClub3', 30),
(4, 'Bvsc', 1960);
-- --------------------------------------------------------
--
-- Table structure for table `history`
--
CREATE TABLE IF NOT EXISTS `history` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`playerID` int(11) NOT NULL,
`from` int(11) DEFAULT NULL,
`to` int(11) DEFAULT NULL,
`date` datetime DEFAULT NULL,
`amount` int(11) DEFAULT NULL,
PRIMARY KEY (`ID`),
KEY `playerID` (`playerID`),
KEY `from` (`from`),
KEY `to` (`to`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=13 ;
--
-- Dumping data for table `history`
--
INSERT INTO `history` (`ID`, `playerID`, `from`, `to`, `date`, `amount`) VALUES
(3, 1, 1, 2, '2013-09-14 17:54:01', 1000),
(4, 2, 2, 1, '2013-09-14 17:54:10', 3000),
(10, 4, 4, 1, '2013-09-15 10:12:36', 3200),
(12, 4, 1, 3, '2013-09-15 10:56:52', 3100);
-- --------------------------------------------------------
--
-- Table structure for table `player`
--
CREATE TABLE IF NOT EXISTS `player` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`clubID` int(11) DEFAULT NULL,
`name` varchar(125) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`age` int(11) DEFAULT NULL,
`nation` varchar(2) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=5 ;
--
-- Dumping data for table `player`
--
INSERT INTO `player` (`ID`, `clubID`, `name`, `age`, `nation`) VALUES
(1, 1, 'Player1', 21, 'hu'),
(2, 2, 'Player2', 32, 'de'),
(3, 3, 'Player3', 22, 'gr'),
(4, 3, 'Gere', 32, 'hu');
-- --------------------------------------------------------
--
-- Table structure for table `tbl_migration`
--
CREATE TABLE IF NOT EXISTS `tbl_migration` (
`version` varchar(255) NOT NULL,
`apply_time` int(11) DEFAULT NULL,
PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `tbl_migration`
--
INSERT INTO `tbl_migration` (`version`, `apply_time`) VALUES
('m130911_152250_player', 1378913557),
('m130911_153401_club', 1378913897),
('m130911_153843_history', 1378914023);
--
-- Constraints for dumped tables
--
--
-- Constraints for table `history`
--
ALTER TABLE `history`
ADD CONSTRAINT `history_ibfk_1` FOREIGN KEY (`playerID`) REFERENCES `player` (`ID`),
ADD CONSTRAINT `history_ibfk_2` FOREIGN KEY (`from`) REFERENCES `club` (`ID`),
ADD CONSTRAINT `history_ibfk_3` FOREIGN KEY (`to`) REFERENCES `club` (`ID`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;