-
Notifications
You must be signed in to change notification settings - Fork 0
/
fantastic_teaching.sql
164 lines (149 loc) · 23.1 KB
/
fantastic_teaching.sql
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
-- Adminer 4.2.2 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP DATABASE IF EXISTS `fantastic_teaching`;
CREATE DATABASE `fantastic_teaching` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */;
USE `fantastic_teaching`;
DROP TABLE IF EXISTS `allowed_accounts`;
CREATE TABLE `allowed_accounts` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(128) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
INSERT INTO `allowed_accounts` (`id`, `email`) VALUES
(1, 'd805ddd4cd620561635b001020373b3fe7945e9ab116e0701a6ec02b0b39203cc47cee927c4c5a336a1a3050980cb99bbb32bd7ace31c55e23c3486f3059b1d7'),
(2, 'f638b0dd412a7de0fc17612db3271543e48a74070ff31312444e621c2c0160d1bdfbb5e511126c83eccf1534dd5567e4232b6e3c936fb53355a8eae47d6738e4'),
(3, 'b8cba57da356b0f18e7245cee154e6f1a5182e26e5eaee5b8b3cb1eb990219b135c9663f8f32c2c03938ed6afb63233bf530914edf1b10ceb60e1894c765663a'),
(4, '8cf0d552d9620083dfc508138bb66355af53b75bab61ba08eefae22ef8b1507b49316793fdd08002163abefa7a30048a1e12d60015748f0f6b0bd9e6738dce43')
ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `email` = VALUES(`email`);
DROP TABLE IF EXISTS `content`;
CREATE TABLE `content` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(100) COLLATE utf8_bin NOT NULL,
`subject` enum('Matte','Svenska','Geografi','Historia') COLLATE utf8_bin NOT NULL,
`year` enum('1-2','3-5','6-7','8-9') COLLATE utf8_bin NOT NULL,
`estimate` enum('1','2','3','4','5','6','7','8','9','10') COLLATE utf8_bin NOT NULL,
`text` longtext COLLATE utf8_bin,
`file` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`video` varchar(150) COLLATE utf8_bin DEFAULT NULL,
`author_id` int(11) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
INSERT INTO `content` (`id`, `title`, `subject`, `year`, `estimate`, `text`, `file`, `timestamp`, `video`, `author_id`) VALUES
(76, 'addition', 'Matte', '1-2', '4', 'Addition är ett av de fyra grundläggande räknesätten inom aritmetiken. Addition betecknas oftast med plustecknet (+) som infördes omkring år 1500, och är en binär operator. Addition av ett negativt tal är ekvivalent med subtraktion.\r\n\r\nVid addition läggs värdet av två (eller flera) termer samman till en summa. Att summan av sex och två är åtta skrivs 6+2=8 och utläses \"sex adderat med två är åtta\" eller \"sex plus två är åtta\".\r\n\r\nUpprepad addition betecknas med summatecken \\scriptstyle{\\sum}, ursprungligen den versala grekiska bokstaven Σ, sigma. Exempel:\r\n\r\n\\sum_{i=2}^{5} i = 2 + 3 + 4 + 5\r\nUpprepad addition med samma term motsvarar multiplikaton med ett heltal:\r\n\r\n\\sum_{i=1}^{n} x = x \\cdot n \r\nBegreppet addition och plusoperatorn används också för att beteckna andra binära operationer med liknande algebraiska egenskaper, exempelvis vektoraddition, matrisaddition, eller-operatorn i Boolesk algebra, modulär addition, och konkatenering av textsträngar.\r\n\r\nSumman av två naturliga tal a och b kan uppfattas som antalet objekt i den uppsättning som ges av att till en uppsättning med a objekt foga en uppsättning med b objekt. Addition av tal lyder under en kompositionsregel; två element ställs samman och resulterar i ett element. a och b ställs samman och bildar exempelvis c. Vid addition av talet 0 till ett element a bibehålls a oförändrat, a + 0 = a. Noll förändrar inte a:s värde vid addition, detta gäller för varje tal a.[1]', '', '2016-01-23 17:38:33', '', 15),
(77, 'ekvation', 'Matte', '3-5', '8', 'Inom matematiken är uppställandet av en ekvation ett sätt att med symboler beskriva, att de kvantitativa värdena av två matematiska uttryck är lika. Uttrycken, som kallas led, skiljs åt med ett likhetstecken. Det som står till vänster kallas för vänsterledet och det som står till höger för högerledet.\r\n\r\nEkvationer kan användas för att beskriva kända förhållanden, till exempel fysikaliska eller ekonomiska sådana. Att lösa en ekvation är att bestämma de värden på ekvationens variabler för vilka ekvationen är uppfylld.\r\n\r\nEn annan typ av matematiskt påstående, är olikheten.', '', '2016-01-23 17:39:44', '', 15),
(78, 'subtraktion', 'Matte', '1-2', '4', 'Inom aritmetiken är subtraktion ett av de fyra räknesätten. Vid subtraktion bildas differensen (skillnaden) mellan två tal, termer. Differensen mellan talen a och b skrivs a − b, där a kallas minuend och b kallas subtrahend, åtskilda av ett minustecken.[1]. Differensen är positiv om a > b och negativ om a < b. Subtraktion är omvänd addition.', '', '2016-01-23 17:40:45', '', 15),
(82, 'multiplikation', 'Matte', '3-5', '8', 'Multiplikation är ett av de grundläggande räknesätten (operationerna) inom aritmetiken. Dess symbol är multiplikationstecknet (·). De tal som multipliceras med varandra kallas faktorer och resultatet produkt. Multiplikation kan ses som upprepad addition eller som proportionalitet.', '56a3bca2b3e0a.png', '2016-01-23 17:47:14', '', 15),
(84, 'primtal', 'Matte', '1-2', '6', 'Ett primtal är ett heltal p, som är större än 1 och som endast är delbart med ±1 och ±p.\r\n\r\nDen grekiske matematikern Euklides visade på 300-talet f.Kr., med Euklides sats, att det finns ett oändligt antal primtal.', '', '2016-01-23 17:49:14', 'lEvXcTYqtKU', 15),
(85, 'afrika', 'Geografi', '1-2', '3', 'Afrika är jordens näst största kontinent (efter Eurasien) och även jordens näst största världsdel efter Asien, både vad gäller areal och folkmängd. Med världsdelens öar inräknade mäter Afrika 30 244 050 km², vilket motsvarar 20,3 % av jordens landmassa eller cirka 6 % av jordens totala area. Omkring 22 miljoner km² av dessa ligger i tropikerna vilket gör den afrikanska kontinenten till världens varmaste kontinent. I Afrika bor det ungefär 1 miljard människor i 55 länder – en sjundedel av jordens befolkning. Dess längd i nordlig-sydlig riktning är omkring 8 000 km och dess största bredd omkring 7 800 km.\r\nlänk: https://sv.wikipedia.org/wiki/Afrika', '56a3bdb64e233.png', '2016-01-23 17:51:50', '', 15),
(86, 'asien', 'Geografi', '1-2', '4', 'Asien är jordens största och mest folkrika världsdel. Sedan 1700-talet har gränsen mellan Europa och Asien vanligen ansetts gå genom Uralbergen, Uralfloden, Kaspiska havet, Kaukasus, Svarta havet, Bosporen, Marmarasjön och Dardanellerna. Gränsen mellan Asien och Afrika anses normalt vara Sueznäset och Röda havet. Omkring 60 % av världens befolkning bor i Asien, varav enbart kring 2 % bor i norra och innersta delen, det vill säga Mongoliet, de centralasiatiska länderna Kazakstan, Uzbekistan, Turkmenistan, Kirgizistan och Tadzjikistan, de kinesiska provinserna Xinjiang, Tibet, Qinghai och ryska Sibirien.\r\n\r\nDå världsdelar delvis definieras genom kulturgeografi, det vill säga på grundval av kulturell samhörighet, och inte genom geologi, råder det en skillnad mellan Asien som världsdel och som geografisk kontinent. Asien och Europa befinner sig på samma kontinent och denna heter Eurasien. Världsdelen Asien omfattar en del av den Eurasiatiska kontinenten, närmare bestämt ett område från Sinaihalvön, Turkiet och Uralbergen i väster till Berings Sund, Japan, Taiwan, Filippinerna och Indonesien i öster.\r\n\r\nIdén om att den gamla världen har tre kontinenter går tillbaka till antiken. Namnet Asien härleds från de uråldriga civilisationerna i Mellanöstern. Asien var under Romarriket benämning på en romersk provins som låg i dagens Turkiet. Betydelsen för namnet Asien har senare kommit att utsträckas till att omfatta hela området från Sinaihalvön, Turkiet och Uralbergen i väster till Berings sund, Japan, Taiwan, Filippinerna och Indonesien i öster.', '56a3beea6f90f.png', '2016-01-23 17:56:58', '', 15),
(89, 'dalmål', 'Svenska', '6-7', '1', 'dialektmysterier med fredrik lindström', '', '2016-01-23 18:05:29', 'V1YqXOSoDmc', 15),
(90, 'gnällbältet', 'Svenska', '3-5', '2', 'dialektmysterier med Fredrik Lindström', '', '2016-01-23 18:06:43', 'R8skbVy4GVQ', 15),
(93, 'Pythagoras sats - INTRO', 'Matte', '8-9', '2', 'Pythagoras sats är en av matematikens mest kända satser. Enligt Pythagoras sats så gäller för en rätvinklig triangels sidor att\r\n\r\nKvadraten på hypotenusan är lika med summan av kvadraterna på kateterna.\r\nHypotenusan är den längsta sidan i en rätvinklig triangel och är motstående sida till den räta vinkeln. Katet är benämningen på var och en av de två sidor vilka bildar den räta vinkeln.\r\n\r\nSambandet i Pythagoras sats kan skrivas som Pythagoras ekvation:\r\n\r\na^2 + b^2 = c^2\r\ndär a, b och c är sidornas längder för en rätvinklig triangel och c är hypotenusans längd.\r\n\r\nSatsens namn kommer från den grekiske matematikern Pythagoras (580 f.kr – 495 f.kr) som brukar tillskrivas det första beviset för satsen, men satsen var förmodligen redan tidigare känd i Babylonien.\r\nCosinussatsen[redigera | redigera wikitext]\r\nPythagoras sats kan ses som ett specialfall av cosinussatsen, vilken gäller för alla trianglar.\r\n\r\nLåt a, b och c vara sidolängderna hos en triangel och låt θ vara vinkeln mellan två av sidorna, a och b. Sambandet mellan triangelns sidor och vinkeln är då\r\n\r\nc^2 = a^2 + b^2 - 2ab \\,\\cos\\theta\r\nOm vinkeln θ är lika med 90 grader är cos θ = 0 och Pythagoras sats följer.\r\n\r\nEgyptiska trianglar och pythagoreiska tripler[redigera | redigera wikitext]\r\nEn egyptisk triangel är en rätvinklig triangel vars sidolängder förhåller sig till varandra som talen 3, 4 och 5. För en sådan triangel kan sidorna betecknas med 3n, 4n och 5n, där n är ett positivt heltal. Enligt Pythagoras sats gäller då att\r\n\r\n(3n)^2 + (4n)^2 = (5n)^2 \\Rightarrow 9 n^2 + 16 n^2 = 25 n^2\r\nvilket visar att satsen gäller för alla egyptiska trianglar.\r\n\r\nTre positiva heltal, a, b och c, kallas för en pythagoreisk trippel (a,b,c), om a2 + b2 = c2. Enligt en formel angiven av Euklides kan talen i en pythagoreisk trippel bildas med hjälp av uttrycken m2 - n2, 2mn och m2 + n2, där m och n är positiva heltal och m > n enligt\r\n\r\n a = k\\cdot(m^2 - n^2) ,\\ \\, b = k\\cdot(2mn) ,\\ \\, c = k\\cdot(m^2 + n^2)\r\ndär k är ett positivt heltal.\r\n\r\nExempel på pythagoreiska tripler som inte svarar mot egyptiska trianglar är triplerna (5, 12, 13), (8, 15, 17) och (7, 24, 25).\r\n\r\nAv resultat ovan följer också att det finns lika många pythagoreiska tripler som det finns positiva heltal.', '56a520c7ebb70.png', '2016-01-24 19:06:47', 'uaj0XcLtN5c', 16),
(94, 'Oregelbundna verb', 'Svenska', '3-5', '2', 'Oregelbundna verb är verb som inte följer de regler som gäller för regelbundna verb vid konjugation. Olika språk har olika regler.\r\n\r\nRegelbundenhet/oregelbundenhet hos verb avser hur verbet böjs när man tar tema på det, dvs man skriver det i infinitiv, imperfekt, supinum och presens particip . Exempel: arbeta - arbetade - arbetat.\r\n\r\nEtt regelbundet verbs grundform (till exempel arbeta, böja, må) böjs genom en förutsägbar regel. Man kan gruppera regelbundna verb i grupper som böjs på liknande sätt. En sådan grupp kallas konjugation. I svenskan har vi fyra konjugationer (dvs fyra grupper av regelbundna verb med sin respektive uppsättning regler). Exempel: den första konjugationen på svenska innebär att man till grundformen lägger -r, -de, -t:\r\n\r\nJag arbetar hela dagen.\r\nJag arbetade på X igår.\r\nJag har arbetat hårt.\r\nIbland tror man att tex springa är oregelbundet (springa – sprang – sprungit) men det följer faktiskt en regel och hör till fjärde konjugationen. Fjärde konjugationen utgörs av s.k. starka verb:\r\n\r\nJag springer.\r\nJag sprang till X igår.\r\nJag har sprungit.\r\nEtt oregelbundet verb (till exempel gå) följer inte dessa regler och hör därför inte till någon konjugation:\r\n\r\nJag går\r\nJag gick till X igår.\r\nJag har gått.\r\nSe även[redigera | redigera wikitext]\r\nRegelbundet verb\r\nStarka verb\r\nSvaga verb', '', '2016-01-24 19:10:44', '', 16),
(95, 'Gustav Vasa', 'Historia', '3-5', '2', 'Gustav Vasa eller Gustav I[1], sannolikt född 12 maj 1496, död 29 september 1560[2], var kung av Sverige 1523–1560 och riksföreståndare 1521–1523, under det pågående befrielsekriget. Hans makttillträde, inlett som ett uppror mot unionskungen Kristian II efter Stockholms blodbad innebar slutet för Kalmarunionen. Gustav tillhörde Vasaätten, som genom honom blev den första monarkiska dynastin som regerade ett enat svenskt kungadöme som ett arvrike. Hans regering kännetecknas av införandet av ett starkt centralstyre i hela riket med en effektiv byråkrati och en evangelisk statskyrka grundad på Luthers lära.\r\n\r\nGustavs roll i införandet av en svensk arvmonarki ses i dag som grundandet av den moderna nationalstaten Sverige, och det är den 6 juni – datumet då han valdes till kung av riksdagen 1523 – som är Sveriges nationaldag. Han har senare, särskilt från det sena 1800-talet, upphöjts till landsfader och har därmed blivit en viktig nationell symbol. I modern historiesyn har Gustav I utsatts för en mer kritisk analys där man poängterat hur han med brutala metoder och intensiv propaganda befäste sin makt och röjde motståndare ur vägen. Historikern Lars-Olof Larsson har pekat på att Gustav med hänsynslöshet och maktlystnad i kombination med politisk skicklighet i mycket uppträdde i enlighet med den italienske politiske filosofen Niccolò Machiavellis principer för en furstes befästande av sin makt, något som den svenska historieskrivningen ofta uteslutit.[3]', '56a522291610e.jpg', '2016-01-24 19:12:41', '', 16),
(96, 'Stockholms blodbad', 'Historia', '3-5', '4', 'Stockholms blodbad var den rannsakning och efterföljande avrättningar som ägde rum i Stockholm den 7–9 november 1520. Händelserna inleddes direkt efter Kristian II:s (som efter blodbadet blev känd som Kristian Tyrann i Sverige[1]) kröning till svensk kung när gästerna på kröningsfesten kallades till ett möte på slottet. Ärkebiskop Gustav Trolles krav på ekonomisk kompensation för bland annat Stäkets rivning ledde till frågan om den tidigare riksföreståndaren Sten Sture den yngre och hans anhängare hade gjort sig skyldiga till kätteri. Med stöd i kanonisk rätt avrättades närmare 100 personer[2] de följande dagarna. Bland de avrättade återfanns många inom aristokratin som hade givit sitt stöd åt Sturepartiet under de föregående åren.', '56a52521289db.jpg', '2016-01-24 19:25:21', '', 16),
(97, 'infinity', 'Matte', '8-9', '2', 'Sometimes infinity is even bigger than you think... Dr James Grime explains with a little help from Georg Cantor.', '', '2016-01-24 20:47:12', 'elvOZm0d4H0', 15),
(98, 'arabic numerals', 'Matte', '3-5', '1', 'Hank unravels the fascinating yarn of how the world came to use so-called Arabic numerals -- from the scholarship of ancient Hindu mathematicians, to Muslim scientist Al-Khwarizmi, to the merchants of medieval Italy. \r\n', '', '2016-01-24 20:54:28', 'Ar7CNsJUm58', 15),
(99, 'Europas historia', 'Geografi', '1-2', '1', 'Denna artikel skildrar Europas historia.\r\n\r\nDe första för-människorna kom till Europa för cirka 800 000 år sedan som ett resultat av att Homo erectus spred sig över jorden. Medan den moderna människan (Homo sapiens) fortfarande utvecklades i Afrika levde Homo heidelbergensis och Homo neanderthalensis (neandertalmänniska) i Europa.\r\n\r\nDe första moderna människorna utvecklades i Afrika för omkring 200 000 år sedan och kom till Europa för cirka 40 000 år sedan.[1] Det var endast en liten grupp afrikaner som för kanske 60 000 år sedan tog sig över till Sinaihalvön, och som blev förfäder till alla människor utom de svarta afrikaner som stannade i Afrika.[1][2] Forskarna tvistar ännu om vägen till Europa har gått direkt norrut genom det som idag är Israel, Libanon och Syrien, eller om våra förfäder tog sig vidare över till Arabiska halvön och sedan följde Indiska oceanens kust tills de stötte på floder som de följde norrut. I bägge fallen bör Homo sapiens i sin första inflyttningsvåg till Europa för 40 000 år sedan ha tagit sig till Europa via det som idag är Anatolien (Turkiska halvön), där mycket gamla fynd har hittats, och vidare över Bosporen.[3][1]\r\n\r\nAnsiktsbenen från den hittills äldsta \"europén\" – en 40 000 år gamla fossil från en tonåring – har hittats i en grotta i Rumänien, och Richard Neave, brittisk kriminaltekniker har återskapat ansiktet med hjälp av kopior av skallbenen. En mörkhyad, men inte svart, person med ansiktsdrag som inte överensstämmer helt med någon nu levande folkgrupp blev resultatet. (Den ljusa hudfärgen antas ha utvecklats som ett resultat av människans behov av vitamin D.) Neave talar om ett ansikte som tycks befinna sig i \"flux\" – i ett tillstånd av förändring mot vilken som helst av de folkgrupper som idag finns i världen.[4] Omkring tio procent av dagens européer bär på gener från dessa första européer.[3] Européerna är dock ingen folkgrupp avskild från andra på jorden. Om vi moderna människor jämför oss med varandra är en person, vilken som helst, till 99,9 procent genetiskt identisk med en slumpvis utvald människa var som helst på jorden. Enligt nya rön bär dessutom alla människor på jorden utom svarta afrikaner på en liten mängd genetiskt material som är unikt för neandertalmänniskan.[2]\r\n\r\nDe sista neandertalmänniskorna dog ut för cirka 30 000 år sedan. För cirka 25 000 år sedan svepte vågor av invandrare från Asien in i Europa, och kom att dominera kontinenten. Att likadana konstföremål hittats från dagens Frankrike till området kring Kaspiska havet tyder på ett socialt nätverk och människor med en övergripande gemensam kultur.[3]', '56a53a7521a94.png', '2016-01-24 20:56:21', '', 15)
ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `title` = VALUES(`title`), `subject` = VALUES(`subject`), `year` = VALUES(`year`), `estimate` = VALUES(`estimate`), `text` = VALUES(`text`), `file` = VALUES(`file`), `timestamp` = VALUES(`timestamp`), `video` = VALUES(`video`), `author_id` = VALUES(`author_id`);
DROP TABLE IF EXISTS `goals`;
CREATE TABLE `goals` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`goal` varchar(150) COLLATE utf8_bin NOT NULL,
`subject` enum('Matte','Svenska','Geografi','Historia') COLLATE utf8_bin NOT NULL,
`year` enum('1-2','3-5','6-7','8-9') COLLATE utf8_bin NOT NULL,
`user_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
INSERT INTO `goals` (`id`, `goal`, `subject`, `year`, `user_id`) VALUES
(27, 'kristians mål', 'Svenska', '1-2', 6),
(30, 'Teach some stuff', 'Historia', '6-7', 12),
(31, 'Lära ut lite andra saker', 'Geografi', '1-2', 12),
(32, 'klass 5c vecka 7', 'Matte', '1-2', 15),
(34, 'Addition', 'Matte', '1-2', 9),
(35, 'Historia år 3', 'Historia', '3-5', 9),
(36, 'Historia år 3', 'Historia', '3-5', 16),
(37, 'Klass 3e vecka 13', 'Geografi', '3-5', 15)
ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `goal` = VALUES(`goal`), `subject` = VALUES(`subject`), `year` = VALUES(`year`), `user_id` = VALUES(`user_id`);
DROP TABLE IF EXISTS `goals_use_content`;
CREATE TABLE `goals_use_content` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`goal_id` int(10) unsigned DEFAULT NULL,
`content_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
INSERT INTO `goals_use_content` (`id`, `goal_id`, `content_id`, `user_id`) VALUES
(46, 6, 51, 9),
(47, NULL, 51, NULL),
(48, NULL, 51, NULL),
(49, NULL, 75, NULL),
(50, 30, 75, 12),
(51, 32, 84, 15),
(52, 32, 82, 15),
(53, 32, 78, 15),
(54, 32, 89, 15),
(55, NULL, 92, NULL),
(56, NULL, 90, NULL),
(57, 34, 76, 9),
(58, 34, 77, 9),
(59, 35, 95, 9),
(60, 36, 95, 16),
(61, 36, 96, 16),
(62, 37, 96, 15),
(63, 37, 90, 15),
(64, 32, 99, 15)
ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `goal_id` = VALUES(`goal_id`), `content_id` = VALUES(`content_id`), `user_id` = VALUES(`user_id`);
DROP TABLE IF EXISTS `rating`;
CREATE TABLE `rating` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`content_id` int(11) unsigned NOT NULL,
`rating` int(11) NOT NULL,
`users_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `content_id` (`content_id`),
KEY `users_id` (`users_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
INSERT INTO `rating` (`id`, `content_id`, `rating`, `users_id`) VALUES
(76, 90, 23, 15),
(77, 89, 13, 15),
(78, 86, 100, 15),
(79, 85, 56, 15),
(80, 84, 7, 15),
(81, 82, 89, 15),
(82, 78, 5, 15),
(83, 77, 23, 15),
(84, 76, 45, 15),
(85, 92, 1, 9),
(86, 90, 1, 9),
(87, 89, -1, 9),
(88, 86, 1, 9),
(89, 84, -1, 9),
(90, 95, 1, 9),
(91, 95, 1, 16),
(92, 96, 1, 15),
(93, 94, 1, 15),
(94, 99, 1, 15),
(95, 98, 1, 15),
(96, 97, 1, 15),
(97, 99, 1, 16)
ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `content_id` = VALUES(`content_id`), `rating` = VALUES(`rating`), `users_id` = VALUES(`users_id`);
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(50) COLLATE utf8_bin NOT NULL,
`salt` varchar(150) COLLATE utf8_bin NOT NULL,
`password` char(128) COLLATE utf8_bin NOT NULL,
`level` enum('Free','Premium') COLLATE utf8_bin NOT NULL DEFAULT 'Free',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
INSERT INTO `users` (`id`, `username`, `salt`, `password`, `level`) VALUES
(6, 'Kristian2', 'aqOj% qE¯¾MScz', 'd33d27aeea7524fb42a9ffb5149ce735cfcbb237d9f311798bae74009ff3eec5158effe8e7e7dbfa8239aeff6b218703c61941a4307d9a7a8a91e9b68dec1910', 'Premium'),
(15, 'eriklovenstad', ',pç‘ï@d¡U ;Åœà', '0cfcd70bcfd5996709f271035d96a147a42ec1d5e43c34dd560c62f37ac5778e748a91d9dffeee23972dc109067b538ef710c958350aa54f6d44ca938eaa280c', 'Premium'),
(16, 'KlaraKollerstrom', 'À„¾)&^§Õݶ!çŠ', '07992091b2013fd2dcf8fae664814c861e0274619e70cb887a57499d08b8daec4c5bf9b827770da057896a55b0b9168940acb185df18b1bc2ed7bea04388a0b5', 'Premium')
ON DUPLICATE KEY UPDATE `id` = VALUES(`id`), `username` = VALUES(`username`), `salt` = VALUES(`salt`), `password` = VALUES(`password`), `level` = VALUES(`level`);
-- 2016-01-24 23:06:31