~jcsackett/charmworld/bac-tag-constraints

« back to all changes in this revision

Viewing changes to charmworld/migrations/versions/tests/data/migration_027.py

  • Committer: Tarmac
  • Author(s): Reed O'Brien
  • Date: 2014-05-20 14:46:39 UTC
  • mfrom: (511.1.6 es-migration)
  • Revision ID: tarmac-20140520144639-2wypg2q2m2qwvjch
This makes the ngram work migrate cleanly. Fixes: https://bugs.launchpad.net/bugs/1314239.

Approved by Juju Gui Bot, Brad Crittenden.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
old_charm_mapping = {"charm": {
 
2
    "type": "object",
 
3
    "dynamic": "false",
 
4
    "properties": {
 
5
        "data": {
 
6
            "properties": {
 
7
                "_id": {
 
8
                    "type": "string",
 
9
                    "index": "not_analyzed",
 
10
                    "omit_norms": True,
 
11
                    "index_options": "docs"
 
12
                },
 
13
                "categories": {
 
14
                    "type": "string",
 
15
                    "index": "not_analyzed",
 
16
                    "omit_norms": True,
 
17
                    "index_options": "docs"
 
18
                },
 
19
                "config": {
 
20
                    "properties": {
 
21
                        "options": {
 
22
                            "properties": {
 
23
                                "default": {
 
24
                                    "type": "string"},
 
25
                                "description": {
 
26
                                    "type": "string"}
 
27
                            }
 
28
                        }
 
29
                    }
 
30
                },
 
31
                "date_created": {
 
32
                    "type": "date",
 
33
                    "format": "dateOptionalTime"
 
34
                },
 
35
                "description": {"type": "string"},
 
36
                "downloads": {"type": "long"},
 
37
                "downloads_in_past_30_days": {"type": "long"},
 
38
                "downloads_in_past_7_days": {"type": "long"},
 
39
                "downloads_in_past_half_year": {"type": "long"},
 
40
                "i_provides": {
 
41
                    "type": "string",
 
42
                    "index": "not_analyzed",
 
43
                    "omit_norms": True,
 
44
                    "index_options": "docs"
 
45
                },
 
46
                "i_requires": {
 
47
                    "type": "string",
 
48
                    "index": "not_analyzed",
 
49
                    "omit_norms": True,
 
50
                    "index_options": "docs"
 
51
                },
 
52
                "is_featured": {"type": "boolean"},
 
53
                "name": {
 
54
                    "type": "string",
 
55
                    "index": "not_analyzed",
 
56
                    "omit_norms": True,
 
57
                    "index_options": "docs"
 
58
                },
 
59
                "owner": {
 
60
                    "type": "string",
 
61
                    "index": "not_analyzed", "omit_norms": True,
 
62
                    "index_options": "docs"
 
63
                },
 
64
                "series": {
 
65
                    "type": "string",
 
66
                    "index": "not_analyzed",
 
67
                    "omit_norms": True,
 
68
                    "index_options": "docs"
 
69
                },
 
70
                "store_data": {
 
71
                    "properties": {
 
72
                        "errors": {"type": "string"}
 
73
                    }
 
74
                },
 
75
                "store_url": {
 
76
                    "type": "string",
 
77
                    "index": "not_analyzed",
 
78
                    "omit_norms": True,
 
79
                    "index_options": "docs"
 
80
                },
 
81
                "summary": {"type": "string"}
 
82
            }
 
83
        },
 
84
        "provides": {
 
85
            "dynamic": "false",
 
86
            "properties": {
 
87
                "interface": {
 
88
                    "type": "string",
 
89
                    "index": "not_analyzed",
 
90
                    "omit_norms": True,
 
91
                    "index_options": "docs"
 
92
                },
 
93
                "relation_name": {
 
94
                    "type": "string",
 
95
                    "index": "not_analyzed",
 
96
                    "omit_norms": True,
 
97
                    "index_options": "docs"
 
98
                },
 
99
                "scope": {
 
100
                    "type": "string",
 
101
                    "index": "not_analyzed",
 
102
                    "omit_norms": True,
 
103
                    "index_options": "docs"
 
104
                }
 
105
            }
 
106
        },
 
107
        "requires": {
 
108
            "dynamic": "false",
 
109
            "properties": {
 
110
                "interface": {
 
111
                    "type": "string",
 
112
                    "index": "not_analyzed",
 
113
                    "omit_norms": True,
 
114
                    "index_options": "docs"
 
115
                },
 
116
                "relation_name": {
 
117
                    "type": "string",
 
118
                    "index": "not_analyzed",
 
119
                    "omit_norms": True,
 
120
                    "index_options": "docs"
 
121
                },
 
122
                "scope": {
 
123
                    "type": "string",
 
124
                    "index": "not_analyzed",
 
125
                    "omit_norms": True,
 
126
                    "index_options": "docs"
 
127
                }
 
128
            }
 
129
        }
 
130
    }
 
131
}}
 
132
 
 
133
old_bundle_mapping = {"bundle": {
 
134
    "type": "object",
 
135
    "dynamic": "false",
 
136
    "properties": {
 
137
        "data": {
 
138
            "properties": {
 
139
                "name": {
 
140
                    "type": "string",
 
141
                    "index": "not_analyzed",
 
142
                    "omit_norms": True,
 
143
                    "index_options": "docs"
 
144
                },
 
145
                "owner": {
 
146
                    "type": "string",
 
147
                    "index": "not_analyzed",
 
148
                    "omit_norms": True,
 
149
                    "index_options": "docs"
 
150
                },
 
151
                "series": {
 
152
                    "type": "string",
 
153
                    "index": "not_analyzed",
 
154
                    "omit_norms": True,
 
155
                    "index_options": "docs"
 
156
                },
 
157
                "title": {
 
158
                    "type": "string",
 
159
                    "index": "not_analyzed",
 
160
                    "omit_norms": True,
 
161
                    "index_options": "docs"
 
162
                }
 
163
            }
 
164
        }
 
165
    }
 
166
}}