apisub_dataset.sql 1.56 KB
Newer Older
Stephane Crozat's avatar
Fix #9  
Stephane Crozat committed
1
/** Test dataset **/
2
3
BEGIN;

Stephane Crozat's avatar
Fix #9  
Stephane Crozat committed
4
DELETE FROM api;
Stephane Crozat's avatar
Stephane Crozat committed
5
6
7
DELETE FROM localuser;

INSERT INTO localuser (utclogin) VALUES ('crozatst');
8
9
10
11
INSERT INTO localuser (utclogin) VALUES ('prof1');
INSERT INTO localuser (utclogin) VALUES ('student1');
INSERT INTO localuser (utclogin) VALUES ('student2');
INSERT INTO localuser (utclogin) VALUES ('student3');
Stephane Crozat's avatar
Fix #9  
Stephane Crozat committed
12
13

INSERT INTO api VALUES (
14
  '1e06e8dc-2178-11e9-8edb-4bc5e8f8599c',
Stephane Crozat's avatar
Stephane Crozat committed
15
  TO_DATE('20190121','yyyymmdd'),1,'Poésie et ingénierie','Lorem ipsum dolor sit amet',5,24,2,'crozatst'
Stephane Crozat's avatar
Fix #9  
Stephane Crozat committed
16
17
);
INSERT INTO api VALUES (
18
  '2afa8472-2178-11e9-b2b0-07511495b3b2',
19
  TO_DATE('20190121','yyyymmdd'),2,'Cloud big data blockchain IA','At vero eos et accusamus',3,12,1,'crozatst'
20
21
22
);
INSERT INTO api VALUES (
  '4352b3a0-217d-11e9-aabc-037b6e1a6a16',
23
  TO_DATE('20190128','yyyymmdd'),3,'La TRM et la G1','Duis rhoncus turpis non libero auctor posuere.',5,50,2,'crozatst'
Stephane Crozat's avatar
Fix #9  
Stephane Crozat committed
24
);
Stephane Crozat's avatar
Stephane Crozat committed
25

26
27
28
29
30
31
32
33
34
35
36
37
38
39
INSERT INTO subscribe (utclogin,api,subdate) VALUES (
  'student1','1e06e8dc-2178-11e9-8edb-4bc5e8f8599c',TO_DATE('20190121','yyyymmdd')
);
INSERT INTO subscribe (utclogin,api,subdate) VALUES (
  'student1','2afa8472-2178-11e9-b2b0-07511495b3b2',TO_DATE('20190121','yyyymmdd')
);
INSERT INTO subscribe (utclogin,api,subdate) VALUES (
  'student1','4352b3a0-217d-11e9-aabc-037b6e1a6a16',TO_DATE('20190121','yyyymmdd')
);
INSERT INTO subscribe (utclogin,api,subdate) VALUES (
  'student2','1e06e8dc-2178-11e9-8edb-4bc5e8f8599c',TO_DATE('20190121','yyyymmdd')
);

SELECT id, normcode, name FROM vapi;
Stephane Crozat's avatar
Stephane Crozat committed
40
SELECT * FROM vlocaluser;
41
SELECT utclogin, id, normcode FROM vsubscription;
Stephane Crozat's avatar
Stephane Crozat committed
42
SELECT * FROM vapi_count;
43
44

COMMIT;