@@ -31,6 +31,7 @@ module.exports = function(sequelize, DataTypes) {
3131 copyright_authors : jsonDataType ( 'copyright_authors' ) ,
3232 copyright_start_line : jsonDataType ( 'copyright_start_line' ) ,
3333 copyright_end_line : jsonDataType ( 'copyright_end_line' ) ,
34+ license_policy : jsonDataType ( 'license_policy' ) ,
3435 license_expressions : jsonDataType ( 'license_expressions' ) ,
3536 license_key : jsonDataType ( 'license_key' ) ,
3637 license_score : jsonDataType ( 'license_score' ) ,
@@ -135,6 +136,7 @@ module.exports = function(sequelize, DataTypes) {
135136 copyright_authors : getCopyrightValues ( file . authors ) ,
136137 copyright_start_line : getValues ( file . holders , 'start_line' ) ,
137138 copyright_end_line : getValues ( file . holders , 'end_line' ) ,
139+ license_policy : getLicensePolicyLabel ( file . license_policy ) ,
138140 license_expressions : file . license_expressions ,
139141 license_key : getValues ( file . licenses , 'key' ) ,
140142 license_score : getValues ( file . licenses , 'score' ) ,
@@ -203,6 +205,15 @@ module.exports = function(sequelize, DataTypes) {
203205 return Model ;
204206} ;
205207
208+ function getLicensePolicyLabel ( policy ) {
209+ if ( ! policy ) {
210+ return ;
211+ } else if ( ! policy [ 'label' ] ) {
212+ return ;
213+ }
214+ return [ policy [ 'label' ] ] ;
215+ }
216+
206217function getCopyrightValues ( array ) {
207218 if ( ! array ) {
208219 array = [ ] ;
0 commit comments